summaryrefslogtreecommitdiff
path: root/libavcodec/atrac3.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2013-07-09 01:03:13 +0200
committerLuca Barbato <lu_zero@gentoo.org>2013-07-09 10:49:29 +0200
commit874c8a17ac9b04fb7ac23d003e54e3662dd23b4e (patch)
tree8194e2a184e31fa73a1a682c01278c87dc53f161 /libavcodec/atrac3.c
parent0677ddebc6e93c3aee1504be45cec1e8d7299581 (diff)
atrac3: fix error handling
decode_tonal_components returns a proper AVERROR. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec/atrac3.c')
-rw-r--r--libavcodec/atrac3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index bfc26fc027..dbdf77ca25 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -664,8 +664,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);