[FFmpeg-devel] [PATCH] rawenc: use av_get_padded_bits_per_pixel() instead of non-padded bps
Rostislav Pehlivanov
atomnuker at gmail.com
Sat Feb 10 19:14:19 EET 2018
Bitrate was calculated incorrectly.
Signed-off-by: Rostislav Pehlivanov <atomnuker at gmail.com>
---
libavcodec/rawenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/rawenc.c b/libavcodec/rawenc.c
index d181b74570..cd476d4bb1 100644
--- a/libavcodec/rawenc.c
+++ b/libavcodec/rawenc.c
@@ -41,7 +41,7 @@ FF_DISABLE_DEPRECATION_WARNINGS
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
- avctx->bits_per_coded_sample = av_get_bits_per_pixel(desc);
+ avctx->bits_per_coded_sample = av_get_padded_bits_per_pixel(desc);
if(!avctx->codec_tag)
avctx->codec_tag = avcodec_pix_fmt_to_codec_tag(avctx->pix_fmt);
avctx->bit_rate = ff_guess_coded_bitrate(avctx);
--
2.16.1.101.gde0f0111ea
More information about the ffmpeg-devel
mailing list