aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/grab.c
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2005-10-12 22:35:06 +0000
committerAlex Beregszaszi <alex@rtfs.hu>2005-10-12 22:35:06 +0000
commit4209fad989dcaa1a717888b3712c4e2b29be8bc9 (patch)
treead2751a44a5c931d44f3457054c951bc31e133a1 /libavformat/grab.c
parent90448512c42aed1c413eebc79c107f1c15edf97f (diff)
downloadffmpeg-4209fad989dcaa1a717888b3712c4e2b29be8bc9.tar.gz
lame bit_rate calculation
Originally committed as revision 4632 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/grab.c')
-rw-r--r--libavformat/grab.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/grab.c b/libavformat/grab.c
index d72211c13a..18a1d06588 100644
--- a/libavformat/grab.c
+++ b/libavformat/grab.c
@@ -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: