[0.11] gst-plugins-bad: hlsdemux: Reset in PAUSED-> READY after chaining up to the parent class

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


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

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Fri Sep  2 19:44:31 2011 +0200

hlsdemux: Reset in PAUSED->READY after chaining up to the parent class

Otherwise there are possible race conditions with the streaming thread.

---

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

diff --git a/gst/hls/gsthlsdemux.c b/gst/hls/gsthlsdemux.c
index 4f30bc5..aaff106 100644
--- a/gst/hls/gsthlsdemux.c
+++ b/gst/hls/gsthlsdemux.c
@@ -287,7 +287,6 @@ gst_hls_demux_change_state (GstElement * element, GstStateChange transition)
 
   switch (transition) {
     case GST_STATE_CHANGE_READY_TO_PAUSED:
-    case GST_STATE_CHANGE_PAUSED_TO_READY:
       gst_hls_demux_reset (demux, FALSE);
       break;
     case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
@@ -311,6 +310,7 @@ gst_hls_demux_change_state (GstElement * element, GstStateChange transition)
     case GST_STATE_CHANGE_PAUSED_TO_READY:
       demux->cancelled = TRUE;
       gst_hls_demux_stop (demux);
+      gst_hls_demux_reset (demux, FALSE);
       break;
     default:
       break;



More information about the gstreamer-commits mailing list