mssdemux: only try to reload the manifest for live streams
authorLouis-Francis Ratté-Boulianne <louis-francis.ratte-boulianne@collabora.co.uk>
Wed, 30 Jan 2013 03:57:36 +0000 (22:57 -0500)
committerThiago Santos <thiago.sousa.santos@collabora.com>
Wed, 8 May 2013 00:09:47 +0000 (21:09 -0300)
There is no way to know if a live stream is really finished, so try to reload the manifest and check if there are more fragments to download. Else just let know it's the EOS.

ext/smoothstreaming/gstmssdemux.c

index c277ed5..34ec651 100644 (file)
@@ -1001,8 +1001,10 @@ gst_mss_demux_stream_download_fragment (GstMssDemuxStream * stream,
     case GST_FLOW_OK:
       break;                    /* all is good, let's go */
     case GST_FLOW_UNEXPECTED:  /* EOS */
-      gst_mss_demux_reload_manifest (mssdemux);
-      return GST_FLOW_OK;
+      if (gst_mss_manifest_is_live (mssdemux->manifest)) {
+        gst_mss_demux_reload_manifest (mssdemux);
+        return GST_FLOW_OK;
+      }
       return GST_FLOW_UNEXPECTED;
     case GST_FLOW_ERROR:
       goto error;