Commit 99a6f820 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

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
parent 00a938f1
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment