From: Zebediah Figura Subject: [PATCH v2 2/5] winegstreamer: Check for failure from gst_element_set_state() instead of counting pads. Message-Id: <1519311977-13458-2-git-send-email-z.figura12@gmail.com> Date: Thu, 22 Feb 2018 09:06:14 -0600 In-Reply-To: <1519311977-13458-1-git-send-email-z.figura12@gmail.com> References: <1519311977-13458-1-git-send-email-z.figura12@gmail.com> Especially since pads might be exposed before failure is reported. Signed-off-by: Zebediah Figura --- dlls/winegstreamer/gstdemux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index b48648c..b4c29db 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1160,11 +1160,11 @@ static HRESULT GST_Connect(GSTInPin *pPin, IPin *pConnectPin, ALLOCATOR_PROPERTI ResetEvent(This->event); gst_element_set_state(This->container, GST_STATE_PLAYING); WaitForSingleObject(This->event, -1); - gst_element_get_state(This->container, NULL, NULL, -1); + ret = gst_element_get_state(This->container, NULL, NULL, -1); - if (!This->cStreams) + if (ret == GST_STATE_CHANGE_FAILURE) { - FIXME("GStreamer could not find any streams\n"); + ERR("GStreamer failed to play stream\n"); return E_FAIL; } -- 2.7.4