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

Otherwise there are possible race conditions with the streaming thread.
This commit is contained in:
Sebastian Dröge 2011-09-02 19:44:31 +02:00
parent 52a6db2206
commit a82f92aed2

View file

@ -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;