[FFmpeg-cvslog] atrac3: fix error handling
Luca Barbato
git at videolan.org
Tue Aug 27 16:51:17 CEST 2013
ffmpeg | branch: release/1.1 | Luca Barbato <lu_zero at gentoo.org> | Tue Jul 9 01:03:13 2013 +0200| [8f3fe7c696866c965ebc4444aaa5487bb1cd53f1] | committer: Luca Barbato
atrac3: fix error handling
decode_tonal_components returns a proper AVERROR.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
(cherry picked from commit 874c8a17ac9b04fb7ac23d003e54e3662dd23b4e)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8f3fe7c696866c965ebc4444aaa5487bb1cd53f1
---
libavcodec/atrac3.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index 910c15e..632cc37 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);
More information about the ffmpeg-cvslog
mailing list