1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

lavc/encode: pick a sane default for bits_per_raw_sample if it's not set

Fixes #9563.
This commit is contained in:
Anton Khirnov 2022-01-20 16:56:53 +01:00
parent ee26138e67
commit e663030267

View File

@ -555,6 +555,9 @@ FF_DISABLE_DEPRECATION_WARNINGS
FF_ENABLE_DEPRECATION_WARNINGS
#endif
if (!avctx->bits_per_raw_sample)
avctx->bits_per_raw_sample = 8 * av_get_bytes_per_sample(avctx->sample_fmt);
return 0;
}