diff options
author | Martin Storsjo <martin@martin.st> | 2013-11-01 10:46:40 +0200 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2013-11-01 10:46:40 +0200 |
commit | 321233ee92e138f44294c7bb9a375eadad9d24fa (patch) | |
tree | 1de928ad26325302f64c56603157f50095dcf2b1 /libSYS/src | |
parent | fcb5f1b692cb8343de35e69f9084328c652cf690 (diff) | |
parent | fa3eba16446cc8f2f5e2dfc20d86a49dbd37299e (diff) | |
download | fdk-aac-dabplus-321233ee92e138f44294c7bb9a375eadad9d24fa.tar.gz fdk-aac-dabplus-321233ee92e138f44294c7bb9a375eadad9d24fa.tar.bz2 fdk-aac-dabplus-321233ee92e138f44294c7bb9a375eadad9d24fa.zip |
Merge remote-tracking branch 'aosp/kitkat-release' into kitkat-merge
Conflicts:
libAACenc/src/quantize.cpp
Diffstat (limited to 'libSYS/src')
-rw-r--r-- | libSYS/src/cmdl_parser.cpp | 6 | ||||
-rw-r--r-- | libSYS/src/conv_string.cpp | 2 | ||||
-rw-r--r-- | libSYS/src/genericStds.cpp | 6 | ||||
-rw-r--r-- | libSYS/src/linux/FDK_stackload_linux.cpp | 2 | ||||
-rw-r--r-- | libSYS/src/linux/audio_linux.cpp | 2 | ||||
-rw-r--r-- | libSYS/src/linux/coresup_linux.cpp | 2 | ||||
-rw-r--r-- | libSYS/src/linux/genericStds_linux.cpp | 2 | ||||
-rw-r--r-- | libSYS/src/linux/uart_linux.cpp | 2 | ||||
-rw-r--r-- | libSYS/src/mips/genericStds_mips.cpp | 2 | ||||
-rw-r--r-- | libSYS/src/wav_file.cpp | 26 |
10 files changed, 29 insertions, 23 deletions
diff --git a/libSYS/src/cmdl_parser.cpp b/libSYS/src/cmdl_parser.cpp index bf020ee..24ec0d5 100644 --- a/libSYS/src/cmdl_parser.cpp +++ b/libSYS/src/cmdl_parser.cpp @@ -2,7 +2,7 @@ /* ----------------------------------------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. +© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -465,7 +465,7 @@ INT CheckArg(TEXTCHAR* arg, TEXTCHAR* str, UINT numArgs, TEXTCHAR type, TEXTCHAR for ( i = 0; i < _tcslen(arg); ++i ) { - if ( (type == 'd') && !_istdigit(arg[i]) && arg[i] != 'x' ) + if ( (type == 'd') && !_istdigit(arg[i]) && arg[i] != 'x' && arg[i] != '-') { #ifdef _UNICODE _ftprintf(stderr, _TEXT("\n\nError: Argument '%ls' for switch '%ls' is not a valid number.\n" ), arg, cur_str); @@ -549,7 +549,7 @@ int IIS_ProcessCmdlList(const char* param_filename, int (*pFunction)(int, TEXTCH /* Skip consecutive blanks. */ while (*line_ptr == ' ' && line_ptr < line+CMDL_MAX_STRLEN) line_ptr++; - /* Assign argument. TODO: maybe handle quotes */ + /* Assign argument. */ argv_ptr[argc] = line_ptr; /* Get pointer to next blank. */ line_ptr = (char*)FDKstrchr(line_ptr, ' '); diff --git a/libSYS/src/conv_string.cpp b/libSYS/src/conv_string.cpp index f730337..28cbc83 100644 --- a/libSYS/src/conv_string.cpp +++ b/libSYS/src/conv_string.cpp @@ -2,7 +2,7 @@ /* ----------------------------------------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. +© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION diff --git a/libSYS/src/genericStds.cpp b/libSYS/src/genericStds.cpp index 6bc4bd2..f0199fb 100644 --- a/libSYS/src/genericStds.cpp +++ b/libSYS/src/genericStds.cpp @@ -2,7 +2,7 @@ /* ----------------------------------------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. +© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -98,8 +98,8 @@ amm-info@iis.fraunhofer.de /* library info */ #define SYS_LIB_VL0 1 -#define SYS_LIB_VL1 2 -#define SYS_LIB_VL2 2 +#define SYS_LIB_VL1 3 +#define SYS_LIB_VL2 4 #define SYS_LIB_TITLE "System Integration Library" #define SYS_LIB_BUILD_DATE __DATE__ #define SYS_LIB_BUILD_TIME __TIME__ diff --git a/libSYS/src/linux/FDK_stackload_linux.cpp b/libSYS/src/linux/FDK_stackload_linux.cpp index 549d99d..82fa9ab 100644 --- a/libSYS/src/linux/FDK_stackload_linux.cpp +++ b/libSYS/src/linux/FDK_stackload_linux.cpp @@ -2,7 +2,7 @@ /* ----------------------------------------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. +© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION diff --git a/libSYS/src/linux/audio_linux.cpp b/libSYS/src/linux/audio_linux.cpp index d99f876..835b27b 100644 --- a/libSYS/src/linux/audio_linux.cpp +++ b/libSYS/src/linux/audio_linux.cpp @@ -2,7 +2,7 @@ /* ----------------------------------------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. +© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION diff --git a/libSYS/src/linux/coresup_linux.cpp b/libSYS/src/linux/coresup_linux.cpp index 49a042b..9e6fa85 100644 --- a/libSYS/src/linux/coresup_linux.cpp +++ b/libSYS/src/linux/coresup_linux.cpp @@ -2,7 +2,7 @@ /* ----------------------------------------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. +© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION diff --git a/libSYS/src/linux/genericStds_linux.cpp b/libSYS/src/linux/genericStds_linux.cpp index f28def7..da375c0 100644 --- a/libSYS/src/linux/genericStds_linux.cpp +++ b/libSYS/src/linux/genericStds_linux.cpp @@ -2,7 +2,7 @@ /* ----------------------------------------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. +© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION diff --git a/libSYS/src/linux/uart_linux.cpp b/libSYS/src/linux/uart_linux.cpp index 31e0419..dee5694 100644 --- a/libSYS/src/linux/uart_linux.cpp +++ b/libSYS/src/linux/uart_linux.cpp @@ -2,7 +2,7 @@ /* ----------------------------------------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. +© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION diff --git a/libSYS/src/mips/genericStds_mips.cpp b/libSYS/src/mips/genericStds_mips.cpp index 98a30c3..e08ec48 100644 --- a/libSYS/src/mips/genericStds_mips.cpp +++ b/libSYS/src/mips/genericStds_mips.cpp @@ -2,7 +2,7 @@ /* ----------------------------------------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. +© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION diff --git a/libSYS/src/wav_file.cpp b/libSYS/src/wav_file.cpp index 8764be9..58bcfaa 100644 --- a/libSYS/src/wav_file.cpp +++ b/libSYS/src/wav_file.cpp @@ -2,7 +2,7 @@ /* ----------------------------------------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android -© Copyright 1995 - 2012 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. +© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION @@ -174,7 +174,6 @@ INT WAV_InputOpen (HANDLE_WAV *pWav, const char *filename) 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 }; USHORT extraFormatBytes, validBitsPerSample; - UINT channelMask; UCHAR guid[16]; INT i; @@ -184,7 +183,7 @@ INT WAV_InputOpen (HANDLE_WAV *pWav, const char *filename) if (extraFormatBytes >= 22) { FDKfread_EL(&(validBitsPerSample), 2, 1, wav->fp); - FDKfread_EL(&(channelMask), 4, 1, wav->fp); + FDKfread_EL(&(wav->channelMask), 4, 1, wav->fp); FDKfread_EL(&(guid), 16, 1, wav->fp); /* check for PCM GUID */ @@ -228,12 +227,12 @@ INT WAV_InputOpen (HANDLE_WAV *pWav, const char *filename) /* Error path */ error: - if (wav->fp) { - FDKfclose(wav->fp); - wav->fp = NULL; - } if (wav) { + if (wav->fp) { + FDKfclose(wav->fp); + wav->fp = NULL; + } FDKfree(wav); } @@ -388,6 +387,11 @@ INT WAV_OutputOpen(HANDLE_WAV *pWav, const char *outputFilename, INT sampleRate, HANDLE_WAV wav = (HANDLE_WAV)FDKcalloc(1, sizeof(struct WAV)); UINT size = 0; + if (wav == NULL) { + FDKprintfErr("WAV_OutputOpen(): Unable to allocate WAV struct.\n"); + goto bail; + } + if (bitsPerSample != 16 && bitsPerSample != 24 && bitsPerSample != 32) { FDKprintfErr("WAV_OutputOpen(): Invalid argument (bitsPerSample).\n"); @@ -433,10 +437,12 @@ INT WAV_OutputOpen(HANDLE_WAV *pWav, const char *outputFilename, INT sampleRate, return 0; bail: - if (wav->fp) - FDKfclose(wav->fp); - if (wav) + if (wav) { + if (wav->fp) { + FDKfclose(wav->fp); + } FDKfree(wav); + } pWav = NULL; |