From 205b8fd078e50aa3f7f401646dbb73de1bb35a10 Mon Sep 17 00:00:00 2001 From: Tobias Rapp Date: Mon, 6 Mar 2017 08:53:28 +0100 Subject: avcodec: estimate output bitrate for uncompressed video codecs Allows to get a more realistic total bitrate (and estimated file size) in avi_write_header. Previously a static default value of 200k was assumed. Adds an internal helper function for bitrate guessing. Signed-off-by: Tobias Rapp Reviewed-by: Michael Niedermayer --- libavcodec/y41penc.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libavcodec/y41penc.c') diff --git a/libavcodec/y41penc.c b/libavcodec/y41penc.c index 94acc343fb..ca94a3c171 100644 --- a/libavcodec/y41penc.c +++ b/libavcodec/y41penc.c @@ -31,6 +31,7 @@ static av_cold int y41p_encode_init(AVCodecContext *avctx) } avctx->bits_per_coded_sample = 12; + avctx->bit_rate = ff_guess_coded_bitrate(avctx); return 0; } -- cgit v1.2.3