atrac3: fix error handling
decode_tonal_components returns a proper AVERROR.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5eaed6d336
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:

committed by
Michael Niedermayer

parent
fffc9316da
commit
221bbd002c
@@ -661,8 +661,8 @@ static int decode_channel_sound_unit(ATRAC3Context *q, GetBitContext *gb,
|
|||||||
|
|
||||||
snd->num_components = decode_tonal_components(gb, snd->components,
|
snd->num_components = decode_tonal_components(gb, snd->components,
|
||||||
snd->bands_coded);
|
snd->bands_coded);
|
||||||
if (snd->num_components == -1)
|
if (snd->num_components < 0)
|
||||||
return -1;
|
return snd->num_components;
|
||||||
|
|
||||||
num_subbands = decode_spectrum(gb, snd->spectrum);
|
num_subbands = decode_spectrum(gb, snd->spectrum);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user