flvmux: don't set duration for live stream
authorDavid Schleef <ds@schleef.org>
Sat, 22 Jan 2011 08:13:16 +0000 (00:13 -0800)
committerDavid Schleef <ds@schleef.org>
Fri, 18 Feb 2011 02:05:43 +0000 (18:05 -0800)
gst/flv/gstflvmux.c

index e731604..68a0df4 100644 (file)
@@ -685,9 +685,11 @@ gst_flv_mux_create_metadata (GstFlvMux * mux)
 
   /* Some players expect the 'duration' to be always set. Fill it out later,
      after querying the pads or after getting EOS */
-  tmp = gst_flv_mux_create_number_script_value ("duration", 0);
-  script_tag = gst_buffer_join (script_tag, tmp);
-  tags_written++;
+  if (!mux->streamable) {
+    tmp = gst_flv_mux_create_number_script_value ("duration", 86400);
+    script_tag = gst_buffer_join (script_tag, tmp);
+    tags_written++;
+  }
 
   /* Sometimes the information about the total file size is useful for the
      player. It will be filled later, after getting EOS */