diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2008-03-01 00:26:19 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2008-03-01 00:26:19 +0000 |
commit | 73260a11e1a3da8a0c67967f71d460db8bd0a4df (patch) | |
tree | a0495ca78017fd5fe7bdecf3a62a9b3e6629cc78 /libavformat/matroskaenc.c | |
parent | 2401daaf3911d29380d061da671571b05f9cb3f8 (diff) | |
download | ffmpeg-73260a11e1a3da8a0c67967f71d460db8bd0a4df.tar.gz |
simplification proposed by Rich
Originally committed as revision 12280 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r-- | libavformat/matroskaenc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 00818b54fb..d096f7204b 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -149,7 +149,8 @@ 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 (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); |