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 /libMpegTPEnc/src/tpenc_lib.cpp | |
parent | fcb5f1b692cb8343de35e69f9084328c652cf690 (diff) | |
parent | fa3eba16446cc8f2f5e2dfc20d86a49dbd37299e (diff) | |
download | ODR-AudioEnc-321233ee92e138f44294c7bb9a375eadad9d24fa.tar.gz ODR-AudioEnc-321233ee92e138f44294c7bb9a375eadad9d24fa.tar.bz2 ODR-AudioEnc-321233ee92e138f44294c7bb9a375eadad9d24fa.zip |
Merge remote-tracking branch 'aosp/kitkat-release' into kitkat-merge
Conflicts:
libAACenc/src/quantize.cpp
Diffstat (limited to 'libMpegTPEnc/src/tpenc_lib.cpp')
-rw-r--r-- | libMpegTPEnc/src/tpenc_lib.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libMpegTPEnc/src/tpenc_lib.cpp b/libMpegTPEnc/src/tpenc_lib.cpp index 4f3177d..d0a2fec 100644 --- a/libMpegTPEnc/src/tpenc_lib.cpp +++ b/libMpegTPEnc/src/tpenc_lib.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 @@ -150,12 +150,18 @@ C_ALLOC_MEM(Ram_TransportEncoder, TRANSPORTENC, 1) TRANSPORTENC_ERROR transportEnc_Open( HANDLE_TRANSPORTENC *phTpEnc ) { - HANDLE_TRANSPORTENC hTpEnc = GetRam_TransportEncoder(0); + HANDLE_TRANSPORTENC hTpEnc; - if ( hTpEnc == NULL ) { + if ( phTpEnc == NULL ){ return TRANSPORTENC_INVALID_PARAMETER; } + hTpEnc = GetRam_TransportEncoder(0); + + if ( hTpEnc == NULL ) { + return TRANSPORTENC_NO_MEM; + } + *phTpEnc = hTpEnc; return TRANSPORTENC_OK; } @@ -417,7 +423,7 @@ TRANSPORTENC_ERROR transportEnc_WriteAccessUnit( } /* Write PCE as first raw_data_block element */ - transportEnc_writePCE(&hTp->bitStream, hTp->config.channelMode, hTp->config.samplingRate, 0, 1, hTp->config.matrixMixdownA, hTp->config.flags & CC_PSEUDO_SURROUND, alignAnchor); + transportEnc_writePCE(&hTp->bitStream, hTp->config.channelMode, hTp->config.samplingRate, 0, 1, hTp->config.matrixMixdownA, (hTp->config.flags&CC_PSEUDO_SURROUND)?1:0, alignAnchor); if ( (hTp->transportFmt==TT_MP4_ADTS) && !hTp->writer.adts.protection_absent) { adtsWrite_CrcEndReg(&hTp->writer.adts, &hTp->bitStream, crcIndex); |