Browse Source

Simplify

Originally committed as revision 10365 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
David Conrad 18 years ago
parent
commit
203cce9a92
1 changed files with 3 additions and 7 deletions
  1. +3
    -7
      libavformat/matroskaenc.c

+ 3
- 7
libavformat/matroskaenc.c View File

@@ -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);
}

/**


Loading…
Cancel
Save