mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
mpegaudioparse: Fix stop condition for outputting buffers.
Some mp3 streams have an offset in timestamps, requiring us to push the frame *AFTER* segment.stop in order for the decoder to be able to push all data up to the segment.stop position.
This commit is contained in:
parent
8b2812ca2e
commit
21d2fffb13
1 changed files with 8 additions and 3 deletions
|
@ -792,10 +792,15 @@ gst_mp3parse_emit_frame (GstMPEGAudioParse * mp3parse, guint size,
|
|||
ret = GST_FLOW_OK;
|
||||
} else if (G_UNLIKELY (GST_BUFFER_TIMESTAMP_IS_VALID (outbuf) &&
|
||||
GST_CLOCK_TIME_IS_VALID (mp3parse->segment.stop) &&
|
||||
GST_BUFFER_TIMESTAMP (outbuf) >= mp3parse->segment.stop)) {
|
||||
GST_BUFFER_DURATION_IS_VALID (outbuf) &&
|
||||
GST_BUFFER_TIMESTAMP (outbuf) >=
|
||||
mp3parse->segment.stop + GST_BUFFER_DURATION (outbuf))) {
|
||||
/* Some mp3 streams have an offset in the timestamps, for which we have to
|
||||
* push the frame *after* the end position in order for the decoder to be
|
||||
* able to decode everything up until the segment.stop position */
|
||||
GST_DEBUG_OBJECT (mp3parse,
|
||||
"Buffer after configured segment range %" GST_TIME_FORMAT
|
||||
" to %" GST_TIME_FORMAT ", returning GST_FLOW_UNEXPECTED, timestamp %"
|
||||
"Buffer after configured segment range %" GST_TIME_FORMAT " to %"
|
||||
GST_TIME_FORMAT ", returning GST_FLOW_UNEXPECTED, timestamp %"
|
||||
GST_TIME_FORMAT " duration %" GST_TIME_FORMAT ", offset 0x%08"
|
||||
G_GINT64_MODIFIER "x", GST_TIME_ARGS (push_start),
|
||||
GST_TIME_ARGS (mp3parse->segment.stop),
|
||||
|
|
Loading…
Reference in a new issue