[FFmpeg-devel] [PATCH v2] libavcodec/flacenc: add backward-compatible 32 bit-per-sample capability

Martijn van Beurden mvanb1 at gmail.com
Mon Dec 20 13:25:20 EET 2021


Op ma 20 dec. 2021 om 09:12 schreef Martijn van Beurden <mvanb1 at gmail.com>:
> +            if (avctx->bits_per_raw_sample == 0)
> +                avctx->bits_per_raw_sample = 32;

This part is wrong. bits_per_raw_sample should not be 0. I assumed
that 0 meant 'no different from sample format', but I see now that it
means 'unknown'. Apparently this value is not properly set. With this
patch, 24-bit audio files are also encoded as 32-bit.


More information about the ffmpeg-devel mailing list