[FFmpeg-devel] rawenc: use av_get_padded_bits_per_pixel() instead of non-padded bps

Submitted by Rostislav Pehlivanov on Feb. 10, 2018, 5:14 p.m.

Details

Message ID 20180210171419.9464-1-atomnuker@gmail.com
State New
Headers show

Commit Message

Rostislav Pehlivanov Feb. 10, 2018, 5:14 p.m.
Bitrate was calculated incorrectly.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
---
 libavcodec/rawenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

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);