mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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.
This commit is contained in:
parent
a7a0afa5c4
commit
b21c5c9015
1 changed files with 2 additions and 2 deletions
|
@ -538,8 +538,6 @@ gst_flv_mux_release_pad (GstElement * element, GstPad * pad)
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_flv_mux_push (GstFlvMux * mux, GstBuffer * buffer)
|
gst_flv_mux_push (GstFlvMux * mux, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
mux->byte_count += GST_BUFFER_SIZE (buffer);
|
|
||||||
|
|
||||||
if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer)) {
|
if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer)) {
|
||||||
GstFlvMuxIndexEntry *entry = g_slice_new (GstFlvMuxIndexEntry);
|
GstFlvMuxIndexEntry *entry = g_slice_new (GstFlvMuxIndexEntry);
|
||||||
entry->position = mux->byte_count;
|
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->index = g_list_prepend (mux->index, entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mux->byte_count += GST_BUFFER_SIZE (buffer);
|
||||||
|
|
||||||
return gst_pad_push (mux->srcpad, buffer);
|
return gst_pad_push (mux->srcpad, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue