Commit 1973b0b4 authored by aurel's avatar aurel

makes really sure that no undefined behavior can happen

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12258 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ed4e1007
...@@ -149,7 +149,7 @@ static void put_ebml_num(ByteIOContext *pb, uint64_t num, int bytes) ...@@ -149,7 +149,7 @@ static void put_ebml_num(ByteIOContext *pb, uint64_t num, int bytes)
static void put_ebml_uint(ByteIOContext *pb, unsigned int elementid, uint64_t val) static void put_ebml_uint(ByteIOContext *pb, unsigned int elementid, uint64_t val)
{ {
int i, bytes = 1; int i, bytes = 1;
while (val >> bytes*8 && bytes < 8) bytes++; while (bytes < 8 && val >> bytes*8) bytes++;
put_ebml_id(pb, elementid); put_ebml_id(pb, elementid);
put_ebml_num(pb, bytes, 0); put_ebml_num(pb, bytes, 0);
......
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