mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
flacparse: tweak setting buffer metadata; avoid timestamp jitter
Fixes #631993.
This commit is contained in:
parent
5369b97246
commit
98c7f4b2f6
1 changed files with 4 additions and 3 deletions
|
@ -1247,10 +1247,11 @@ gst_flac_parse_parse_frame (GstBaseParse * parse, GstBuffer * buffer)
|
||||||
GST_BUFFER_OFFSET_END (buffer) =
|
GST_BUFFER_OFFSET_END (buffer) =
|
||||||
flacparse->sample_number + flacparse->block_size;
|
flacparse->sample_number + flacparse->block_size;
|
||||||
}
|
}
|
||||||
GST_BUFFER_DURATION (buffer) =
|
|
||||||
GST_FRAMES_TO_CLOCK_TIME (flacparse->block_size, flacparse->samplerate);
|
|
||||||
GST_BUFFER_OFFSET (buffer) =
|
GST_BUFFER_OFFSET (buffer) =
|
||||||
GST_BUFFER_TIMESTAMP (buffer) + GST_BUFFER_DURATION (buffer);
|
gst_util_uint64_scale (GST_BUFFER_OFFSET_END (buffer), GST_SECOND,
|
||||||
|
flacparse->samplerate);
|
||||||
|
GST_BUFFER_DURATION (buffer) =
|
||||||
|
GST_BUFFER_OFFSET (buffer) - GST_BUFFER_TIMESTAMP (buffer);
|
||||||
|
|
||||||
/* Minimal size of a frame header */
|
/* Minimal size of a frame header */
|
||||||
gst_base_parse_set_min_frame_size (GST_BASE_PARSE (flacparse), MAX (9,
|
gst_base_parse_set_min_frame_size (GST_BASE_PARSE (flacparse), MAX (9,
|
||||||
|
|
Loading…
Reference in a new issue