adaptivedemux: make sure to always stop the stream on EOS
authorThiago Santos <thiagoss@osg.samsung.com>
Wed, 3 Dec 2014 02:29:20 +0000 (23:29 -0300)
committerThiago Santos <thiagoss@osg.samsung.com>
Wed, 3 Dec 2014 12:42:39 +0000 (09:42 -0300)
For On-Demand streams, always stop the tasks for streams that reached
EOS

gst-libs/gst/adaptivedemux/gstadaptivedemux.c

index 3def996..03a4f93 100644 (file)
@@ -1885,17 +1885,13 @@ gst_adaptive_demux_stream_download_loop (GstAdaptiveDemuxStream * stream)
         }
         gst_task_pause (stream->download_task);
       } else {
+        gst_task_pause (stream->download_task);
         if (gst_adaptive_demux_combine_flows (demux) == GST_FLOW_EOS) {
           if (gst_adaptive_demux_has_next_period (demux)) {
-            gst_task_pause (stream->download_task);
             gst_adaptive_demux_advance_period (demux);
             ret = GST_FLOW_OK;
             goto end;
-          } else {
-            gst_task_pause (stream->download_task);
           }
-        } else {
-          ret = GST_FLOW_OK;
         }
       }
       break;