atrac3: fix error handling
decode_tonal_components returns a proper AVERROR.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 874c8a17ac
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavcodec/atrac3.c
This commit is contained in:
@@ -690,7 +690,8 @@ static int decodeChannelSoundUnit (ATRAC3Context *q, GetBitContext *gb, channel_
|
|||||||
if (result) return result;
|
if (result) return result;
|
||||||
|
|
||||||
pSnd->numComponents = decodeTonalComponents (gb, pSnd->components, pSnd->bandsCoded);
|
pSnd->numComponents = decodeTonalComponents (gb, pSnd->components, pSnd->bandsCoded);
|
||||||
if (pSnd->numComponents == -1) return -1;
|
if (pSnd->numComponents < 0)
|
||||||
|
return pSnd->numComponents;
|
||||||
|
|
||||||
numSubbands = decodeSpectrum (gb, pSnd->spectrum);
|
numSubbands = decodeSpectrum (gb, pSnd->spectrum);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user