[PATCH 1/5] winegstreamer: Stop creating the filter if gstreamer fails to render.

Zebediah Figura z.figura12 at gmail.com
Tue Feb 20 20:12:58 CST 2018


Otherwise the push_data() thread will run and try to use resources we
never allocated.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/winegstreamer/gstdemux.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index a19c64f..ea61ed5 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -1103,7 +1103,6 @@ static void unknown_type(GstElement *bin, GstPad *pad, GstCaps *caps, gpointer u
 static HRESULT GST_Connect(GSTInPin *pPin, IPin *pConnectPin, ALLOCATOR_PROPERTIES *props)
 {
     GSTImpl *This = (GSTImpl*)pPin->pin.pinInfo.pFilter;
-    HRESULT hr;
     int ret, i;
     LONGLONG avail, duration;
     GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE(
@@ -1165,7 +1164,7 @@ static HRESULT GST_Connect(GSTInPin *pPin, IPin *pConnectPin, ALLOCATOR_PROPERTI
 
     if (!This->cStreams) {
         FIXME("GStreamer could not find any streams\n");
-        hr = E_FAIL;
+        return E_FAIL;
     } else {
         gst_pad_query_duration(This->ppPins[0]->their_src, GST_FORMAT_TIME, &duration);
         for (i = 0; i < This->cStreams; ++i) {
@@ -1175,7 +1174,6 @@ static HRESULT GST_Connect(GSTInPin *pPin, IPin *pConnectPin, ALLOCATOR_PROPERTI
                 This->ppPins[i]->seek.dwCapabilities = 0;
             WaitForSingleObject(This->ppPins[i]->caps_event, -1);
         }
-        hr = S_OK;
     }
     *props = This->props;
 
@@ -1191,7 +1189,7 @@ static HRESULT GST_Connect(GSTInPin *pPin, IPin *pConnectPin, ALLOCATOR_PROPERTI
     gst_pad_set_active(This->my_src, 1);
 
     This->nextofs = This->nextpullofs = 0;
-    return hr;
+    return S_OK;
 }
 
 static inline GSTOutPin *impl_from_IMediaSeeking( IMediaSeeking *iface )
-- 
2.7.4




More information about the wine-devel mailing list