mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
baseparse: fix stray discont flag set on outgoing buffers in push mode
We have no guarantees about what flags are set on buffers we take out of the GstAdapter. If we push out multiple buffers from the first input buffer (which will have discont set), only the first buffer we push out should be flagged as discont, not all of the buffers produced from that first initial input buffer. Fixes issue where the first few mp3 frames/seconds of data in push mode were skipped or garbled in some cases, and the discont flags would also trip up decoders which were getting drained/flushed for every buffer. This was a regression introduced in 1.6 apparently.
This commit is contained in:
parent
438a83df58
commit
78a832ebd5
1 changed files with 2 additions and 0 deletions
|
@ -791,6 +791,8 @@ gst_base_parse_update_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
||||||
if (G_UNLIKELY (parse->priv->discont)) {
|
if (G_UNLIKELY (parse->priv->discont)) {
|
||||||
GST_DEBUG_OBJECT (parse, "marking DISCONT");
|
GST_DEBUG_OBJECT (parse, "marking DISCONT");
|
||||||
GST_BUFFER_FLAG_SET (frame->buffer, GST_BUFFER_FLAG_DISCONT);
|
GST_BUFFER_FLAG_SET (frame->buffer, GST_BUFFER_FLAG_DISCONT);
|
||||||
|
} else {
|
||||||
|
GST_BUFFER_FLAG_UNSET (frame->buffer, GST_BUFFER_FLAG_DISCONT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parse->priv->prev_offset != parse->priv->offset || parse->priv->new_frame) {
|
if (parse->priv->prev_offset != parse->priv->offset || parse->priv->new_frame) {
|
||||||
|
|
Loading…
Reference in a new issue