flvmux: don't overwrite metadata tag with duration in streaming mode
authorTom Janiszewski <tom.janiszewski@alcatel-lucent.com>
Sun, 1 May 2011 04:04:03 +0000 (00:04 -0400)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 1 May 2011 13:13:50 +0000 (14:13 +0100)
A duration tag gets inserted only for streamable=false, so only
update/write the duration later if we actually inserted that tag,
otherwise we write garbage into other tags.

https://bugzilla.gnome.org/show_bug.cgi?id=649060

gst/flv/gstflvmux.c

index 005570d..40a18e8 100644 (file)
@@ -766,7 +766,7 @@ gst_flv_mux_create_metadata (GstFlvMux * mux)
     }
   }
 
-  if (mux->duration != GST_CLOCK_TIME_NONE) {
+  if (!mux->streamable && mux->duration != GST_CLOCK_TIME_NONE) {
     gdouble d;
     d = gst_guint64_to_gdouble (mux->duration);
     d /= (gdouble) GST_SECOND;