diff options
author | Martin Storsjo <martin@martin.st> | 2019-01-21 15:54:25 +0200 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2019-01-21 15:54:25 +0200 |
commit | 02103fd6308a40c58013d8ec8610ad8a71075aca (patch) | |
tree | 77e30d296d5cec1f24b5c0e03b49f197d5bf080e /libAACenc | |
parent | 2326faaf8f2cdf2c3a9108ccdaf1d7551aec543e (diff) | |
parent | ed56e77acb1ca4524bf49d9cdec7d11a51f5134d (diff) | |
download | fdk-aac-02103fd6308a40c58013d8ec8610ad8a71075aca.tar.gz fdk-aac-02103fd6308a40c58013d8ec8610ad8a71075aca.tar.bz2 fdk-aac-02103fd6308a40c58013d8ec8610ad8a71075aca.zip |
Merge remote-tracking branch 'aosp/master'
Diffstat (limited to 'libAACenc')
-rw-r--r-- | libAACenc/src/aacenc_lib.cpp | 13 | ||||
-rw-r--r-- | libAACenc/src/bitenc.cpp | 2 |
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) { |