[FFmpeg-cvslog] rawvideodec: set bit rate

Paul B Mahol git at videolan.org
Tue Dec 4 16:57:00 CET 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Dec  4 15:50:33 2012 +0000| [481c843a47671d17f7e19392d33ee8089b950e4a] | committer: Paul B Mahol

rawvideodec: set bit rate

Fixes #1989.

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

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

diff --git a/libavformat/rawvideodec.c b/libavformat/rawvideodec.c
index b2ca663..a35f957 100644
--- a/libavformat/rawvideodec.c
+++ b/libavformat/rawvideodec.c
@@ -72,6 +72,8 @@ static int rawvideo_read_header(AVFormatContext *ctx)
     st->codec->width  = width;
     st->codec->height = height;
     st->codec->pix_fmt = pix_fmt;
+    st->codec->bit_rate = av_rescale_q(avpicture_get_size(st->codec->pix_fmt, width, height),
+                                       (AVRational){8,1}, st->time_base);
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list