Browse code

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>

Luca Barbato authored on 2013/07/09 08:03:13
Showing 1 changed files
... ...
@@ -665,8 +665,8 @@ static int decode_channel_sound_unit(ATRAC3Context *q, GetBitContext *gb,
665 665
 
666 666
     snd->num_components = decode_tonal_components(gb, snd->components,
667 667
                                                   snd->bands_coded);
668
-    if (snd->num_components == -1)
669
-        return -1;
668
+    if (snd->num_components < 0)
669
+        return snd->num_components;
670 670
 
671 671
     num_subbands = decode_spectrum(gb, snd->spectrum);
672 672