[FFmpeg-cvslog] yop: set video bit rate

Piotr Bandurski git at videolan.org
Fri Dec 21 21:22:43 CET 2012


ffmpeg | branch: master | Piotr Bandurski <ami_stuff at o2.pl> | Fri Dec 21 01:29:40 2012 +0100| [0e3a4da106ee49cec8688603365a59f24a17ea1f] | committer: Michael Niedermayer

yop: set video bit rate

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0e3a4da106ee49cec8688603365a59f24a17ea1f
---

 libavformat/yop.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/yop.c b/libavformat/yop.c
index 8f140ce..d1c0129 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) {



More information about the ffmpeg-cvslog mailing list