Zebediah Figura : winegstreamer: Don't fail parser_init_stream() if a source pin is not connected.

Alexandre Julliard julliard at winehq.org
Tue Nov 17 15:04:08 CST 2020


Module: wine
Branch: master
Commit: ef7dcc7d519845f7f2d4fdd69c52e50737a21eea
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ef7dcc7d519845f7f2d4fdd69c52e50737a21eea

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Tue Nov 17 11:37:52 2020 -0600

winegstreamer: Don't fail parser_init_stream() if a source pin is not connected.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winegstreamer/gstdemux.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 771694b4d3c..215e2704a27 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -1432,7 +1432,6 @@ static void gstdemux_destroy(struct strmbase_filter *iface)
 static HRESULT gstdemux_init_stream(struct strmbase_filter *iface)
 {
     struct gstdemux *filter = impl_from_strmbase_filter(iface);
-    HRESULT hr = VFW_E_NOT_CONNECTED, pin_hr;
     const SourceSeeking *seeking;
     GstStateChangeReturn ret;
     unsigned int i;
@@ -1442,12 +1441,11 @@ static HRESULT gstdemux_init_stream(struct strmbase_filter *iface)
 
     for (i = 0; i < filter->source_count; ++i)
     {
-        if (SUCCEEDED(pin_hr = BaseOutputPinImpl_Active(&filter->sources[i]->pin)))
-            hr = pin_hr;
-    }
+        HRESULT hr;
 
-    if (FAILED(hr))
-        return hr;
+        if (filter->sources[i]->pin.pin.peer && FAILED(hr = IMemAllocator_Commit(filter->sources[i]->pin.pAllocator)))
+            ERR("Failed to commit allocator, hr %#x.\n", hr);
+    }
 
     if (filter->no_more_pads_event)
         ResetEvent(filter->no_more_pads_event);
@@ -1480,7 +1478,7 @@ static HRESULT gstdemux_init_stream(struct strmbase_filter *iface)
                 stop_type, seeking->llStop * 100));
     }
 
-    return hr;
+    return S_OK;
 }
 
 static HRESULT gstdemux_start_stream(struct strmbase_filter *iface, REFERENCE_TIME time)




More information about the wine-cvs mailing list