changeset 3097:298c49463701 libavformat

simplification proposed by Rich
author aurel
date Sat, 01 Mar 2008 00:26:19 +0000
parents ce8ea5400041
children fdcab2321805
files matroskaenc.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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);