[FFmpeg-devel] [PATCH] avformat/au: do not use invalid block_align for small bits per sample

Moritz Barsnick barsnick at gmx.net
Sun Dec 23 19:37:31 EET 2018


On Sun, Dec 23, 2018 at 16:29:14 +0100, Paul B Mahol wrote:
>              av_assert0(id >= 23 && id < 23 + 4);
> +            ba = bpcss[id - 23];
>              bps = bpcss[id - 23];
[...]
> -    st->codecpar->block_align = FFMAX(bps * st->codecpar->channels / 8, 1);
> +    st->codecpar->block_align = ba ? ba : FFMAX(bps * st->codecpar->channels / 8, 1);

Since bps never gets reassigned, ba will be equal to bps in the final
quoted line. Why not just use one variable?

Moritz


More information about the ffmpeg-devel mailing list