flvmux: don't overwrite metadata tag with duration in streaming mode

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
This commit is contained in:
Tom Janiszewski 2011-05-01 00:04:03 -04:00 committed by Tim-Philipp Müller
parent a5aea75808
commit b9c2f8b38f

View 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;