aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Bandurski <ami_stuff@o2.pl>2012-12-21 01:29:40 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-21 21:18:12 +0100
commit0e3a4da106ee49cec8688603365a59f24a17ea1f (patch)
tree3d226da58c6a9be3f609d93cbeaecac68bec43b2
parenta8ebb77493d6bd8af6f0b4008813583b20d1f002 (diff)
downloadffmpeg-0e3a4da106ee49cec8688603365a59f24a17ea1f.tar.gz
yop: set video bit rate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/yop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/yop.c b/libavformat/yop.c
index 8f140ceaa6..d1c01290d6 100644
--- a/libavformat/yop.c
+++ b/libavformat/yop.c
@@ -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) {