shithub: aacdec

Download patch

ref: f84bc9bf3c47e900923afb18795dcf6822bbc330
parent: b44f998fd131d47960f6bf97b290e7b7cff9d767
author: knik <knik>
date: Fri Nov 11 06:25:58 EST 2016

Fixed implicit SBR detection via AudioSpecificConfig fail when char is unsigned.
Patch submitted by Fabian Greffrath

--- a/libfaad/mp4.c
+++ b/libfaad/mp4.c
@@ -25,7 +25,7 @@
 ** Commercial non-GPL licensing of this software is possible.
 ** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
 **
-** $Id: mp4.c,v 1.40 2009/02/06 03:39:58 menno Exp $
+** $Id: mp4.c,v 1.41 2016/11/11 11:25:58 knik Exp $
 **/
 
 #include "common.h"
@@ -276,7 +276,7 @@
 
     /* no SBR signalled, this could mean either implicit signalling or no SBR in this file */
     /* MPEG specification states: assume SBR on files with samplerate <= 24000 Hz */
-    if (mp4ASC->sbr_present_flag == -1)
+    if (mp4ASC->sbr_present_flag == (char)-1) /* cannot be -1 on systems with unsigned char */
     {
         if (mp4ASC->samplingFrequency <= 24000)
         {