rawvideodec: set bit rate
authorPaul B Mahol <onemda@gmail.com>
Tue, 4 Dec 2012 15:50:33 +0000 (15:50 +0000)
committerPaul B Mahol <onemda@gmail.com>
Tue, 4 Dec 2012 15:52:58 +0000 (15:52 +0000)
Fixes #1989.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavformat/rawvideodec.c

index b2ca663..a35f957 100644 (file)
@@ -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;
 }