Browse Source

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>
tags/n2.0
Luca Barbato Michael Niedermayer 12 years ago
parent
commit
5eaed6d336
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/atrac3.c

+ 2
- 2
libavcodec/atrac3.c View File

@@ -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);



Loading…
Cancel
Save