[FFmpeg-soc] [soc]: r1079 - matroska/matroskaenc.c

conrad subversion at mplayerhq.hu
Mon Aug 20 21:51:27 CEST 2007


Author: conrad
Date: Mon Aug 20 21:51:27 2007
New Revision: 1079

Log:
Simplify


Modified:
   matroska/matroskaenc.c

Modified: matroska/matroskaenc.c
==============================================================================
--- matroska/matroskaenc.c	(original)
+++ matroska/matroskaenc.c	Mon Aug 20 21:51:27 2007
@@ -104,14 +104,10 @@ static void put_ebml_id(ByteIOContext *p
  */
 static void put_ebml_size_unknown(ByteIOContext *pb, int bytes)
 {
-    uint64_t value = 0;
-    int i;
-
     bytes = FFMIN(bytes, 8);
-    for (i = 0; i < bytes*7 + 1; i++)
-        value |= 1ULL << i;
-    for (i = bytes-1; i >= 0; i--)
-        put_byte(pb, value >> i*8);
+    put_byte(pb, 0x1ff >> bytes);
+    while (--bytes)
+        put_byte(pb, 0xff);
 }
 
 /**



More information about the FFmpeg-soc mailing list