From 725faab590353610caf372e2bbe51d27d0a0275f Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Wed, 17 Apr 2013 16:54:22 -0300 Subject: [PATCH] qtdemux: do not push discont buffers if they aren't discont qtdemux takes its buffers from a GstAdapter. Those buffers are created from the larger buffer that it obtained from upstream and they carry the same flags, including DISCONT if it is set. In these cases, all buffers that qtdemux is going to push would be marked as DISCONT. This scenario can make parsers/decoders flush on every buffer leading to no decoding at all hapenning. This patch prevents this by unsetting the flag if it shouldn't be set. --- gst/isomp4/qtdemux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 736b242fb9..54bb05f368 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -3898,6 +3898,8 @@ gst_qtdemux_decorate_and_push_buffer (GstQTDemux * qtdemux, GST_LOG_OBJECT (qtdemux, "marking discont buffer"); GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT); stream->discont = FALSE; + } else { + GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DISCONT); } gst_pad_push (stream->pad, buffer); @@ -3954,6 +3956,8 @@ gst_qtdemux_decorate_and_push_buffer (GstQTDemux * qtdemux, GST_LOG_OBJECT (qtdemux, "marking discont buffer"); GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT); stream->discont = FALSE; + } else { + GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DISCONT); } if (!keyframe)