Commit 5eaed6d3 authored by Luca Barbato's avatar Luca Barbato Committed by Michael Niedermayer

atrac3: fix error handling

decode_tonal_components returns a proper AVERROR.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 09f59d6a
......@@ -665,8 +665,8 @@ static int decode_channel_sound_unit(ATRAC3Context *q, GetBitContext *gb,
snd->num_components = decode_tonal_components(gb, snd->components,
snd->bands_coded);
if (snd->num_components == -1)
return -1;
if (snd->num_components < 0)
return snd->num_components;
num_subbands = decode_spectrum(gb, snd->spectrum);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment