diff options
author | Tobias Rapp <t.rapp@noa-archive.com> | 2017-03-06 10:53:28 +0300 |
---|---|---|
committer | Tobias Rapp <t.rapp@noa-archive.com> | 2017-03-17 13:55:16 +0300 |
commit | 205b8fd078e50aa3f7f401646dbb73de1bb35a10 (patch) | |
tree | abbe5fa686d8d01a1c3bde998e712e5c26f6a561 /libavcodec/v408enc.c | |
parent | 8db301deadfcf113fb274881e65afcbe3e1bd645 (diff) |
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 <t.rapp@noa-archive.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/v408enc.c')
-rw-r--r-- | libavcodec/v408enc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/v408enc.c b/libavcodec/v408enc.c index f37f360b73..e12965b7ad 100644 --- a/libavcodec/v408enc.c +++ b/libavcodec/v408enc.c @@ -26,6 +26,8 @@ static av_cold int v408_encode_init(AVCodecContext *avctx) { + avctx->bits_per_coded_sample = 32; + avctx->bit_rate = ff_guess_coded_bitrate(avctx); return 0; } |