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

Paul B Mahol onemda at gmail.com
Sun Dec 23 19:45:47 EET 2018


On 12/23/18, Moritz Barsnick <barsnick at gmx.net> wrote:
> 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?

I can not use one variable only.


More information about the ffmpeg-devel mailing list