summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Urbański <wulczer@wulczer.org>2010-03-14 01:09:37 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2010-03-15 13:44:14 +0100
commitb21c5c90152349f93a31938bca4464d4a703f308 (patch)
tree25fc561234ddee7e0b86d3d6ed5f1ede266ea7f1
parenta7a0afa5c4f9a98631b639998bbb3be91b00f978 (diff)
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.
-rw-r--r--gst/flv/gstflvmux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/flv/gstflvmux.c b/gst/flv/gstflvmux.c
index 2d4b81794..b4a9fb80c 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);
}