[FFmpeg-cvslog] r12280 - trunk/libavformat/matroskaenc.c

aurel subversion
Sat Mar 1 01:26:20 CET 2008


Author: aurel
Date: Sat Mar  1 01:26:19 2008
New Revision: 12280

Log:
simplification proposed by Rich

Modified:
   trunk/libavformat/matroskaenc.c

Modified: trunk/libavformat/matroskaenc.c
==============================================================================
--- trunk/libavformat/matroskaenc.c	(original)
+++ trunk/libavformat/matroskaenc.c	Sat Mar  1 01:26:19 2008
@@ -149,7 +149,8 @@ static void put_ebml_num(ByteIOContext *
 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);




More information about the ffmpeg-cvslog mailing list