[FFmpeg-cvslog] atrac3: fix error handling

Luca Barbato git at videolan.org
Mon Jul 15 02:29:23 CEST 2013


ffmpeg | branch: release/1.2 | Luca Barbato <lu_zero at gentoo.org> | Tue Jul  9 01:03:13 2013 +0200| [221bbd002c62ede7427d465922b91f75f055a1a9] | committer: Michael Niedermayer

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 at gmx.at>
(cherry picked from commit 5eaed6d33689cc6f6e7c07463ede6b387b08afc4)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=221bbd002c62ede7427d465922b91f75f055a1a9
---

 libavcodec/atrac3.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index 6216536..8475aa1 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -661,8 +661,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