Avoid infinite loop.

uint64_t >> 64 is an undefined operation

Originally committed as revision 12253 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Aurelien Jacobs 2008-02-26 22:35:07 +00:00
parent b2eb2ff098
commit d597655f77
1 changed files with 1 additions and 1 deletions

View File

@ -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)
{
int i, bytes = 1;
while (val >> bytes*8) bytes++;
while (val >> bytes*8 && bytes < 8) bytes++;
put_ebml_id(pb, elementid);
put_ebml_num(pb, bytes, 0);