summaryrefslogtreecommitdiffstats
path: root/libMpegTPEnc/src/tpenc_lib.cpp
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2013-08-08 18:32:55 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2013-08-20 15:31:42 -0700
commit16c472c201c197d3660334df5952eb4084897f9f (patch)
tree33f6729a47fb3a6021e9a6f6bc2c330fb17924e3 /libMpegTPEnc/src/tpenc_lib.cpp
parenta84864deb7c36b88f104f3116552d52d1ce64045 (diff)
downloadfdk-aac-16c472c201c197d3660334df5952eb4084897f9f.tar.gz
fdk-aac-16c472c201c197d3660334df5952eb4084897f9f.tar.bz2
fdk-aac-16c472c201c197d3660334df5952eb4084897f9f.zip
AAC encoder metadata improvement
AAC-Encoder - Introduce metadata support for parametric stereo audio object type. Write metadata matrix mixdown coefficient only for channel config 5 and 6. Modified file(s): libAACenc/src/aacenc_lib.cpp - Revise metadata encoder downmix gain and fix matrix mixdown coefficient. Modified file(s): libAACenc/src/aacenc_lib.cpp libAACenc/src/metadata_compressor.cpp libMpegTPEnc/src/tpenc_asc.cpp libMpegTPEnc/src/tpenc_lib.cpp libMpegTPEnc/src/version Bug 9428126 Change-Id: I87f5f1a1fdddd8223187aa0f9dc733e0ecc3e7e4
Diffstat (limited to 'libMpegTPEnc/src/tpenc_lib.cpp')
-rw-r--r--libMpegTPEnc/src/tpenc_lib.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/libMpegTPEnc/src/tpenc_lib.cpp b/libMpegTPEnc/src/tpenc_lib.cpp
index 325d3c3..d0a2fec 100644
--- a/libMpegTPEnc/src/tpenc_lib.cpp
+++ b/libMpegTPEnc/src/tpenc_lib.cpp
@@ -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);