Issue a signal to the fragment download cond to stop
the task earlier
demux->stop_stream_task = TRUE;
g_cond_signal (&demux->download_cond);
g_mutex_unlock (&demux->download_lock);
demux->stop_stream_task = TRUE;
g_cond_signal (&demux->download_cond);
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);
}
}
/* wait for the fragment to be completely downloaded */
g_cond_wait (&demux->fragment_download_cond, &demux->fragment_download_lock);
/* wait for the fragment to be completely downloaded */
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);