lame bit_rate calculation
authorAlex Beregszaszi <alex@rtfs.hu>
Wed, 12 Oct 2005 22:35:06 +0000 (22:35 +0000)
committerAlex Beregszaszi <alex@rtfs.hu>
Wed, 12 Oct 2005 22:35:06 +0000 (22:35 +0000)
Originally committed as revision 4632 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/grab.c

index d72211c13af70c5df6119426fef3af4b2930069d..18a1d065884d554cc8c1085ccc3f9e3acb5acb6e 100644 (file)
@@ -267,6 +267,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
     st->codec->height = height;
     st->codec->time_base.den      = frame_rate;
     st->codec->time_base.num = frame_rate_base;
+    st->codec->bit_rate = frame_size * 1/av_q2d(st->codec->time_base) * 8;
 
     return 0;
  fail: