diff options
-rw-r--r-- | gst-libs/gst/adaptivedemux/gstadaptivedemux.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c index ea1365896..3341c98a3 100644 --- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c +++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c @@ -3677,10 +3677,13 @@ gst_adaptive_demux_stream_advance_fragment_unlocked (GstAdaptiveDemux * demux, for (iter = demux->streams; iter; iter = g_list_next (iter)) { /* Only expose if all streams are now cancelled or finished downloading */ - g_mutex_lock (&stream->fragment_download_lock); - can_expose &= (stream->cancelled == TRUE - || stream->download_finished == TRUE); - g_mutex_unlock (&stream->fragment_download_lock); + GstAdaptiveDemuxStream *other = iter->data; + if (other != stream) { + g_mutex_lock (&other->fragment_download_lock); + can_expose &= (other->cancelled == TRUE + || other->download_finished == TRUE); + g_mutex_unlock (&other->fragment_download_lock); + } } if (can_expose) { |