From b21c5c90152349f93a31938bca4464d4a703f308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Urba=C5=84ski?= Date: Sun, 14 Mar 2010 01:09:37 +0100 Subject: [PATCH] flvmux: Fix index building to make entries point to tag's start offset Previous coding was wrongly incrementing the total byte count before adding an index entry. --- 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 2d4b81794e..b4a9fb80c8 100644 --- a/gst/flv/gstflvmux.c +++ b/gst/flv/gstflvmux.c @@ -538,8 +538,6 @@ gst_flv_mux_release_pad (GstElement * element, GstPad * pad) static GstFlowReturn gst_flv_mux_push (GstFlvMux * mux, GstBuffer * buffer) { - mux->byte_count += GST_BUFFER_SIZE (buffer); - if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer)) { GstFlvMuxIndexEntry *entry = g_slice_new (GstFlvMuxIndexEntry); entry->position = mux->byte_count; @@ -548,6 +546,8 @@ gst_flv_mux_push (GstFlvMux * mux, GstBuffer * buffer) mux->index = g_list_prepend (mux->index, entry); } + mux->byte_count += GST_BUFFER_SIZE (buffer); + return gst_pad_push (mux->srcpad, buffer); }