]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
aacdec: Fix check of return value of NeAACDecInit2().
authorAndre Noll <maan@systemlinux.org>
Sat, 4 May 2013 16:13:56 +0000 (18:13 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 4 May 2013 16:13:56 +0000 (18:13 +0200)
This function returns (char)-1 on errors and zero on success. Checking
whether the return value is negative is incorrect on systems where
char is unsigned.  On raspberry/ARM, gcc complains:

aacdec_filter.c:126:6: warning: comparison is always false due to limited range of data type [-Wtype-limits]

Fix this by checking agains zero instead.

aacdec_filter.c

index 55f7ea25fc43b32c9d1c5a28288b867e2151a028..79e666205d866cc2373e198aaccd1a054bbfbe2e 100644 (file)
@@ -123,7 +123,7 @@ next_buffer:
                        ret = -E_AACDEC_INIT;
                        if (NeAACDecInit2(padd->handle, p,
                                        padd->decoder_length, &rate,
                        ret = -E_AACDEC_INIT;
                        if (NeAACDecInit2(padd->handle, p,
                                        padd->decoder_length, &rate,
-                                       &channels) < 0)
+                                       &channels) != 0)
                                goto out;
                }
                padd->sample_rate = rate;
                                goto out;
                }
                padd->sample_rate = rate;