Skip to content

Commit

Permalink
atrac3: fix error handling
Browse files Browse the repository at this point in the history
decode_tonal_components returns a proper AVERROR.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information
lu-zero authored and michaelni committed Jul 10, 2013
1 parent 09f59d6 commit 5eaed6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libavcodec/atrac3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 5eaed6d

Please sign in to comment.