[0.11] gst-plugins-bad: hlsdemux: Join the task instead of just stopping it and not waiting for it to finish

Wim Taymans wtay at kemper.freedesktop.org
Tue Sep 6 07:14:32 PDT 2011


Module: gst-plugins-bad
Branch: 0.11
Commit: 119771eaabb67e43c3a5929f7c9327d6b1f9bb08
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=119771eaabb67e43c3a5929f7c9327d6b1f9bb08

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Wed Aug 31 14:47:40 2011 +0200

hlsdemux: Join the task instead of just stopping it and not waiting for it to finish

Fixes interesting race conditions that cause crashes in decodebin2
because pads are added/removed from child elements although they
should be in READY state already.

---

 gst/hls/gsthlsdemux.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/gst/hls/gsthlsdemux.c b/gst/hls/gsthlsdemux.c
index 9d8c312..522699b 100644
--- a/gst/hls/gsthlsdemux.c
+++ b/gst/hls/gsthlsdemux.c
@@ -664,8 +664,7 @@ gst_hls_demux_stop (GstHLSDemux * demux)
   g_mutex_lock (demux->fetcher_lock);
   gst_hls_demux_stop_fetcher_locked (demux, TRUE);
   g_mutex_unlock (demux->fetcher_lock);
-  if (GST_TASK_STATE (demux->task) != GST_TASK_STOPPED)
-    gst_task_stop (demux->task);
+  gst_task_join (demux->task);
   gst_hls_demux_stop_update (demux);
 }
 



More information about the gstreamer-commits mailing list