mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
hlsdemux: don't pause task when it is stopped
This fixes a potential dead-lock situation from GstTask https://bugzilla.gnome.org/show_bug.cgi?id=675869
This commit is contained in:
parent
281f2f3590
commit
62ddd34807
1 changed files with 9 additions and 8 deletions
|
@ -791,7 +791,9 @@ end_of_playlist:
|
||||||
|
|
||||||
cache_error:
|
cache_error:
|
||||||
{
|
{
|
||||||
gst_task_pause (demux->stream_task);
|
/* Pausing a stopped task will start it */
|
||||||
|
if (GST_TASK_STATE (demux->stream_task) != GST_TASK_STOPPED)
|
||||||
|
gst_task_pause (demux->stream_task);
|
||||||
if (!demux->cancelled) {
|
if (!demux->cancelled) {
|
||||||
GST_ELEMENT_ERROR (demux, RESOURCE, NOT_FOUND,
|
GST_ELEMENT_ERROR (demux, RESOURCE, NOT_FOUND,
|
||||||
("Could not cache the first fragments"), (NULL));
|
("Could not cache the first fragments"), (NULL));
|
||||||
|
@ -802,12 +804,9 @@ cache_error:
|
||||||
|
|
||||||
type_not_found:
|
type_not_found:
|
||||||
{
|
{
|
||||||
gst_task_pause (demux->stream_task);
|
GST_ELEMENT_ERROR (demux, STREAM, TYPE_NOT_FOUND,
|
||||||
if (!demux->cancelled) {
|
("Could not determine type of stream"), (NULL));
|
||||||
GST_ELEMENT_ERROR (demux, STREAM, TYPE_NOT_FOUND,
|
gst_hls_demux_pause_tasks (demux, FALSE);
|
||||||
("Could not determine type of stream"), (NULL));
|
|
||||||
gst_hls_demux_pause_tasks (demux, FALSE);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -828,7 +827,9 @@ error_pushing:
|
||||||
pause_task:
|
pause_task:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (demux, "Pause task");
|
GST_DEBUG_OBJECT (demux, "Pause task");
|
||||||
gst_task_pause (demux->stream_task);
|
/* Pausing a stopped task will start it */
|
||||||
|
if (GST_TASK_STATE (demux->stream_task) != GST_TASK_STOPPED)
|
||||||
|
gst_task_pause (demux->stream_task);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue