matroskamux: fix matroskamux ! matroskademux

Don't carry over DISCONT flags from the input buffers to the
output buffer, or the demuxer might reset its state when it
receives the first data buffer just after parsing the simple
block header, and then expect sane data to follow.
Fixes matroskamux ! demux erroring out.

https://bugzilla.gnome.org/show_bug.cgi?id=754768
https://bugzilla.gnome.org/show_bug.cgi?id=657805
This commit is contained in:
Tim-Philipp Müller 2015-09-10 16:00:50 +01:00
parent 00a938f134
commit 99a6f8207f

View file

@ -255,6 +255,8 @@ gst_ebml_write_flush_cache (GstEbmlWrite * ebml, gboolean is_keyframe,
if (GST_BUFFER_OFFSET (buffer) != ebml->last_pos) {
gst_ebml_writer_send_segment_event (ebml, GST_BUFFER_OFFSET (buffer));
GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
} else {
GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DISCONT);
}
if (ebml->writing_streamheader) {
GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_HEADER);
@ -463,6 +465,8 @@ gst_ebml_write_element_push (GstEbmlWrite * ebml, GstBuffer * buf,
if (GST_BUFFER_OFFSET (buf) != ebml->last_pos) {
gst_ebml_writer_send_segment_event (ebml, GST_BUFFER_OFFSET (buf));
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT);
} else {
GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DISCONT);
}
ebml->last_pos = ebml->pos;
ebml->last_write_result = gst_pad_push (ebml->srcpad, buf);