mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 13:08:49 +00:00
hlsdemux: properly stop tasks by stopping fragment download
Issue a signal to the fragment download cond to stop the task earlier
This commit is contained in:
parent
60eec1443a
commit
2b73e86881
1 changed files with 4 additions and 1 deletions
|
@ -675,6 +675,9 @@ gst_hls_demux_pause_tasks (GstHLSDemux * demux)
|
||||||
demux->stop_stream_task = TRUE;
|
demux->stop_stream_task = TRUE;
|
||||||
g_cond_signal (&demux->download_cond);
|
g_cond_signal (&demux->download_cond);
|
||||||
g_mutex_unlock (&demux->download_lock);
|
g_mutex_unlock (&demux->download_lock);
|
||||||
|
g_mutex_lock (&demux->fragment_download_lock);
|
||||||
|
g_cond_signal (&demux->fragment_download_cond);
|
||||||
|
g_mutex_unlock (&demux->fragment_download_lock);
|
||||||
gst_task_pause (demux->stream_task);
|
gst_task_pause (demux->stream_task);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1839,8 +1842,8 @@ gst_hls_demux_get_next_fragment (GstHLSDemux * demux,
|
||||||
/* wait for the fragment to be completely downloaded */
|
/* wait for the fragment to be completely downloaded */
|
||||||
g_cond_wait (&demux->fragment_download_cond, &demux->fragment_download_lock);
|
g_cond_wait (&demux->fragment_download_cond, &demux->fragment_download_lock);
|
||||||
|
|
||||||
g_mutex_unlock (&demux->fragment_download_lock);
|
|
||||||
gst_element_set_state (demux->src, GST_STATE_READY);
|
gst_element_set_state (demux->src, GST_STATE_READY);
|
||||||
|
g_mutex_unlock (&demux->fragment_download_lock);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue