From 119771eaabb67e43c3a5929f7c9327d6b1f9bb08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 31 Aug 2011 14:47:40 +0200 Subject: [PATCH] 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 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gst/hls/gsthlsdemux.c b/gst/hls/gsthlsdemux.c index 9d8c3126d4..522699bbd9 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); }