changeset 861:728a86721270 libavformat

lame bit_rate calculation
author alex
date Wed, 12 Oct 2005 22:35:06 +0000
parents 9a18db8b5ae2
children aa0abab5e320
files grab.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/grab.c	Tue Oct 04 11:19:08 2005 +0000
+++ b/grab.c	Wed Oct 12 22:35:06 2005 +0000
@@ -267,6 +267,7 @@
     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: