gst-plugins-bad: hlsdemux: stop the fetcher in the PAUSED_TO_READY transition, not when disposing()

Sebastian Dröge slomo at kemper.freedesktop.org
Wed Mar 30 01:07:40 PDT 2011


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

Author: Andoni Morales Alastruey <ylatuya at gmail.com>
Date:   Tue Feb 15 03:41:43 2011 +0100

hlsdemux: stop the fetcher in the PAUSED_TO_READY transition, not when disposing()

---

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

diff --git a/gst/hls/gsthlsdemux.c b/gst/hls/gsthlsdemux.c
index 4dc5cd3..173ca2b 100644
--- a/gst/hls/gsthlsdemux.c
+++ b/gst/hls/gsthlsdemux.c
@@ -139,7 +139,6 @@ gst_hls_demux_dispose (GObject * obj)
 {
   GstHLSDemux *demux = GST_HLS_DEMUX (obj);
 
-  gst_hls_demux_stop_fetcher (demux, TRUE);
   g_cond_free (demux->fetcher_cond);
   g_mutex_free (demux->fetcher_lock);
 
@@ -296,6 +295,14 @@ gst_hls_demux_change_state (GstElement * element, GstStateChange transition)
   }
 
   ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
+
+  switch (transition) {
+    case GST_STATE_CHANGE_PAUSED_TO_READY:
+      gst_hls_demux_stop_fetcher (demux, TRUE);
+      break;
+    default:
+      break;
+  }
   return ret;
 }
 



More information about the gstreamer-commits mailing list