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

Coverity 1139806
This commit is contained in:
Vincent Penquerc'h 2014-05-02 13:29:33 +01:00
parent 10663decd9
commit 5b9fa4e63a

View file

@ -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 */