Mercurial > libavformat.hg
diff matroskaenc.c @ 3097:298c49463701 libavformat
simplification proposed by Rich
author | aurel |
---|---|
date | Sat, 01 Mar 2008 00:26:19 +0000 |
parents | b519194083e6 |
children | ea5623a8efde |
line wrap: on
line diff
--- a/matroskaenc.c Fri Feb 29 11:41:57 2008 +0000 +++ b/matroskaenc.c Sat Mar 01 00:26:19 2008 +0000 @@ -149,7 +149,8 @@ static void put_ebml_uint(ByteIOContext *pb, unsigned int elementid, uint64_t val) { int i, bytes = 1; - while (bytes < 8 && val >> bytes*8) bytes++; + uint64_t tmp = val; + while (tmp>>=8) bytes++; put_ebml_id(pb, elementid); put_ebml_num(pb, bytes, 0);