aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2013-07-09 01:03:13 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-10 02:15:43 +0200
commit5eaed6d33689cc6f6e7c07463ede6b387b08afc4 (patch)
tree23bc30d14d64b127eb6a833452b5a4d28a900f23 /libavcodec
parent09f59d6adfa19d1ad5049416c1d0fbc996f509fd (diff)
downloadffmpeg-5eaed6d33689cc6f6e7c07463ede6b387b08afc4.tar.gz
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>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/atrac3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index 18957cb7ef..0b56352517 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -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);