aboutsummaryrefslogtreecommitdiffstats
path: root/libAACenc/src
diff options
context:
space:
mode:
Diffstat (limited to 'libAACenc/src')
-rw-r--r--libAACenc/src/aacenc_lib.cpp13
-rw-r--r--libAACenc/src/bitenc.cpp2
2 files changed, 11 insertions, 4 deletions
diff --git a/libAACenc/src/aacenc_lib.cpp b/libAACenc/src/aacenc_lib.cpp
index 2f34d4d..8df33a4 100644
--- a/libAACenc/src/aacenc_lib.cpp
+++ b/libAACenc/src/aacenc_lib.cpp
@@ -907,6 +907,7 @@ static AACENC_ERROR FDKaacEnc_AdjustEncSettings(HANDLE_AACENCODER hAacEncoder,
case AOT_MP2_AAC_LC:
case AOT_MP2_SBR:
hAacConfig->usePns = 0;
+ FDK_FALLTHROUGH;
case AOT_AAC_LC:
case AOT_SBR:
case AOT_PS:
@@ -1215,7 +1216,8 @@ static INT aacenc_SbrCallback(void *self, HANDLE_FDK_BITSTREAM hBs,
INT aacenc_SscCallback(void *self, HANDLE_FDK_BITSTREAM hBs,
const AUDIO_OBJECT_TYPE coreCodec,
- const INT samplingRate, const INT stereoConfigIndex,
+ const INT samplingRate, const INT frameSize,
+ const INT stereoConfigIndex,
const INT coreSbrFrameLengthIndex, const INT configBytes,
const UCHAR configMode, UCHAR *configChanged) {
HANDLE_AACENCODER hAacEncoder = (HANDLE_AACENCODER)self;
@@ -1733,9 +1735,10 @@ AACENC_ERROR aacEncEncode(const HANDLE_AACENCODER hAacEncoder,
}
/* check if buffer descriptors are filled out properly. */
- if ((AACENC_OK != validateBufDesc(inBufDesc)) ||
- (AACENC_OK != validateBufDesc(outBufDesc)) || (inargs == NULL) ||
- (outargs == NULL)) {
+ if ((inargs == NULL) || (outargs == NULL) ||
+ ((AACENC_OK != validateBufDesc(inBufDesc)) &&
+ (inargs->numInSamples > 0)) ||
+ (AACENC_OK != validateBufDesc(outBufDesc))) {
err = AACENC_UNSUPPORTED_PARAMETER;
goto bail;
}
@@ -2090,12 +2093,14 @@ AACENC_ERROR aacEncoder_SetParam(const HANDLE_AACENCODER hAacEncoder,
err = AACENC_INVALID_CONFIG;
goto bail;
}
+ FDK_FALLTHROUGH;
case AOT_SBR:
case AOT_MP2_SBR:
if (!(hAacEncoder->encoder_modis & (ENC_MODE_FLAG_SBR))) {
err = AACENC_INVALID_CONFIG;
goto bail;
}
+ FDK_FALLTHROUGH;
case AOT_AAC_LC:
case AOT_MP2_AAC_LC:
case AOT_ER_AAC_LD:
diff --git a/libAACenc/src/bitenc.cpp b/libAACenc/src/bitenc.cpp
index 652d1fd..957e821 100644
--- a/libAACenc/src/bitenc.cpp
+++ b/libAACenc/src/bitenc.cpp
@@ -643,6 +643,7 @@ static INT FDKaacEnc_writeExtensionPayload(HANDLE_FDK_BITSTREAM hBitStream,
FDKwriteBits(hBitStream, *extPayloadData++, 4); /* nibble */
}
extBitsUsed += 4;
+ FDK_FALLTHROUGH;
case EXT_DYNAMIC_RANGE:
case EXT_SBR_DATA:
case EXT_SBR_DATA_CRC:
@@ -690,6 +691,7 @@ static INT FDKaacEnc_writeExtensionPayload(HANDLE_FDK_BITSTREAM hBitStream,
case EXT_FILL_DATA:
fillByte = 0xA5;
+ FDK_FALLTHROUGH;
case EXT_FIL:
default:
if (hBitStream != NULL) {