Commit 5b9fa4e6 authored by Vincent Penquerc'h's avatar Vincent Penquerc'h

matroska: do not lose the top bits when writing a > 32 bit value

Coverity 1139806
parent 10663dec
......@@ -619,9 +619,9 @@ gst_ebml_write_sint (GstEbmlWrite * ebml, guint32 id, gint64 num)
if (num >= 0) {
unum = num;
} else {
unum = 0x80 << (size - 1);
unum = ((guint64) 0x80) << (size - 1);
unum += num;
unum |= 0x80 << (size - 1);
unum |= ((guint64) 0x80) << (size - 1);
}
/* write */
......
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