From 0b5172eb06872d08c87e0fef4cffef1f619f2d81 Mon Sep 17 00:00:00 2001 From: "Andrzej K. Haczewski" Date: Fri, 2 Jul 2010 14:25:22 +0200 Subject: [PATCH] flvmux: Write duration at the correct position --- gst/flv/gstflvmux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/flv/gstflvmux.c b/gst/flv/gstflvmux.c index 2cba5f38b0..eac3ee0842 100644 --- a/gst/flv/gstflvmux.c +++ b/gst/flv/gstflvmux.c @@ -764,7 +764,7 @@ gst_flv_mux_create_metadata (GstFlvMux * mux) GST_DEBUG_OBJECT (mux, "determined the duration to be %f", d); data = GST_BUFFER_DATA (script_tag); - GST_WRITE_DOUBLE_BE (data + 42 + 2 + 8, d); + GST_WRITE_DOUBLE_BE (data + 29 + 2 + 8 + 1, d); } if (mux->have_video) { @@ -1251,7 +1251,7 @@ gst_flv_mux_rewrite_header (GstFlvMux * mux) /* seek back to the preallocated index space */ event = gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_BYTES, - 42, GST_CLOCK_TIME_NONE, 42); + 13 + 29, GST_CLOCK_TIME_NONE, 13 + 29); if (!gst_pad_push_event (mux->srcpad, event)) { GST_WARNING_OBJECT (mux, "Seek to rewrite header failed"); return GST_FLOW_OK;