matroskamux: fix regression causing malformed files

This was caused by me in 1b213d. It seems I was too focused on 0.11 when I did
this and tested the wrong branch.

The problem was reported by Alexey Fisher.
This commit is contained in:
René Stadler 2011-11-07 12:00:12 +01:00
parent d65490dfad
commit 2a139a28d9

View file

@ -411,10 +411,12 @@ gst_ebml_write_element_push (GstEbmlWrite * ebml, GstBuffer * buf,
if (!buf_data)
buf_data = GST_BUFFER_DATA (buf);
if (buf_data_end)
if (buf_data_end) {
data_size = buf_data_end - buf_data;
else
GST_BUFFER_SIZE (buf) = data_size;
} else {
data_size = GST_BUFFER_SIZE (buf);
}
ebml->pos += data_size;