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.
This commit is contained in:
Thiago Santos 2013-04-17 16:54:22 -03:00
parent 4d073beeee
commit 725faab590

View file

@ -3898,6 +3898,8 @@ gst_qtdemux_decorate_and_push_buffer (GstQTDemux * qtdemux,
GST_LOG_OBJECT (qtdemux, "marking discont buffer"); GST_LOG_OBJECT (qtdemux, "marking discont buffer");
GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT); GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
stream->discont = FALSE; stream->discont = FALSE;
} else {
GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DISCONT);
} }
gst_pad_push (stream->pad, buffer); 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_LOG_OBJECT (qtdemux, "marking discont buffer");
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT); GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT);
stream->discont = FALSE; stream->discont = FALSE;
} else {
GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DISCONT);
} }
if (!keyframe) if (!keyframe)