Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gstreamer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2016-02-04 13:07:22 +0300
committerTim-Philipp Müller <tim@centricular.com>2016-02-04 23:58:28 +0300
commita2a914a314bcec49c07ffd8cddd2277cea1f65ef (patch)
tree624520ebcf03b73e69e0a75e8fa1da67ae744b9f
parent39739c015b2cec005887c9369ce1e82500a7f2e9 (diff)
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.
-rw-r--r--libs/gst/base/gstbaseparse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c
index c9a57c5737..c6c43f0d46 100644
--- a/libs/gst/base/gstbaseparse.c
+++ b/libs/gst/base/gstbaseparse.c
@@ -788,6 +788,8 @@ gst_base_parse_update_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
if (G_UNLIKELY (parse->priv->discont)) {
GST_DEBUG_OBJECT (parse, "marking 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) {