diff options
author | David Conrad <lessen42@gmail.com> | 2007-09-05 00:25:20 +0000 |
---|---|---|
committer | David Conrad <lessen42@gmail.com> | 2007-09-05 00:25:20 +0000 |
commit | 203cce9a92e0cedd5372ef4f5a9bb319b04442dc (patch) | |
tree | 50b4e55ea1cfa6c37261f2031567bda8b8277874 | |
parent | 8cf3bb2674a289f9ab8e48b57446d9f239688c80 (diff) | |
download | ffmpeg-203cce9a92e0cedd5372ef4f5a9bb319b04442dc.tar.gz |
Simplify
Originally committed as revision 10365 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/matroskaenc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 636b2f2a8d..7db310a70f 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -104,14 +104,10 @@ static void put_ebml_id(ByteIOContext *pb, unsigned int id) */ 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); } /** |