[FFmpeg-cvslog] r10326 - trunk/libavformat/matroskaenc.c
conrad
subversion
Wed Sep 5 02:23:42 CEST 2007
Author: conrad
Date: Wed Sep 5 02:23:41 2007
New Revision: 10326
Log:
Simplify
Modified:
trunk/libavformat/matroskaenc.c
Modified: trunk/libavformat/matroskaenc.c
==============================================================================
--- trunk/libavformat/matroskaenc.c (original)
+++ trunk/libavformat/matroskaenc.c Wed Sep 5 02:23:41 2007
@@ -76,13 +76,7 @@ static void put_ebml_id(ByteIOContext *p
static int ebml_id_size(unsigned int id)
{
- if (id >= 0x3fffff)
- return 4;
- if (id >= 0x7fff)
- return 3;
- if (id >= 0xff)
- return 2;
- return 1;
+ return (av_log2(id+1)-1)/7+1;
}
// XXX: test this thoroughly and get rid of minbytes hack (currently needed to
More information about the ffmpeg-cvslog
mailing list