Zebediah Figura : winegstreamer: Don' t wait for the no-more-pads signal if playback fails.

Alexandre Julliard julliard at winehq.org
Thu Feb 22 15:07:47 CST 2018


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

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Thu Feb 22 09:06:15 2018 -0600

winegstreamer: Don't wait for the no-more-pads signal if playback fails.

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

---

 dlls/winegstreamer/gstdemux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index b4c29db..8ccf0ad 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -1081,7 +1081,6 @@ static GstBusSyncReply watch_bus(GstBus *bus, GstMessage *msg, gpointer data)
         gst_message_parse_error(msg, &err, &dbg_info);
         FIXME("%s: %s\n", GST_OBJECT_NAME(msg->src), err->message);
         WARN("%s\n", dbg_info);
-        SetEvent(This->event);
     } else if (GST_MESSAGE_TYPE(msg) & GST_MESSAGE_WARNING) {
         gst_message_parse_warning(msg, &err, &dbg_info);
         WARN("%s: %s\n", GST_OBJECT_NAME(msg->src), err->message);
@@ -1159,7 +1158,6 @@ static HRESULT GST_Connect(GSTInPin *pPin, IPin *pConnectPin, ALLOCATOR_PROPERTI
     This->initial = This->discont = TRUE;
     ResetEvent(This->event);
     gst_element_set_state(This->container, GST_STATE_PLAYING);
-    WaitForSingleObject(This->event, -1);
     ret = gst_element_get_state(This->container, NULL, NULL, -1);
 
     if (ret == GST_STATE_CHANGE_FAILURE)
@@ -1168,6 +1166,8 @@ static HRESULT GST_Connect(GSTInPin *pPin, IPin *pConnectPin, ALLOCATOR_PROPERTI
         return E_FAIL;
     }
 
+    WaitForSingleObject(This->event, INFINITE);
+
     gst_pad_query_duration(This->ppPins[0]->their_src, GST_FORMAT_TIME, &duration);
     for (i = 0; i < This->cStreams; ++i)
     {




More information about the wine-cvs mailing list