Commit 2ea0d6ff authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winegstreamer: Check for failure from gst_element_set_state() instead of counting pads.

Especially since pads might be exposed before failure is reported. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAndrew Eikum <aeikum@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 5374d5ca
...@@ -1160,11 +1160,11 @@ static HRESULT GST_Connect(GSTInPin *pPin, IPin *pConnectPin, ALLOCATOR_PROPERTI ...@@ -1160,11 +1160,11 @@ static HRESULT GST_Connect(GSTInPin *pPin, IPin *pConnectPin, ALLOCATOR_PROPERTI
ResetEvent(This->event); ResetEvent(This->event);
gst_element_set_state(This->container, GST_STATE_PLAYING); gst_element_set_state(This->container, GST_STATE_PLAYING);
WaitForSingleObject(This->event, -1); 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; return E_FAIL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment