yop: set video bit rate
authorPiotr Bandurski <ami_stuff@o2.pl>
Fri, 21 Dec 2012 00:29:40 +0000 (01:29 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 21 Dec 2012 20:18:12 +0000 (21:18 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/yop.c

index 8f140ce..d1c0129 100644 (file)
@@ -106,6 +106,8 @@ static int yop_read_header(AVFormatContext *s)
     yop->palette_size       = video_dec->extradata[0] * 3 + 4;
     yop->audio_block_length = AV_RL16(video_dec->extradata + 6);
 
+    video_dec->bit_rate     = 8 * (yop->frame_size - yop->audio_block_length) * frame_rate;
+
     // 1840 samples per frame, 1 nibble per sample; hence 1840/2 = 920
     if (yop->audio_block_length < 920 ||
         yop->audio_block_length + yop->palette_size >= yop->frame_size) {