diff options
author | liuchao <liuchao741@huawei.com> | 2017-02-23 21:48:07 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-02-23 21:48:07 +0000 |
commit | ef9be616803b6de920f838f1bc12f611bc7e16a2 (patch) | |
tree | 68077b14de1d24d36ef7cce1c5bdc271cbcf5342 /libAACenc | |
parent | f4bd5f6bd44b7896d25e8a00b9f312ec2c6a54b1 (diff) | |
parent | b0f6b2906ed8924aed7fbfdaf55bd50ead238f32 (diff) | |
download | fdk-aac-ef9be616803b6de920f838f1bc12f611bc7e16a2.tar.gz fdk-aac-ef9be616803b6de920f838f1bc12f611bc7e16a2.tar.bz2 fdk-aac-ef9be616803b6de920f838f1bc12f611bc7e16a2.zip |
Merge "Fix not properly handled NULL-pointer access before check in aac lib" am: b0af861f5a
am: b0f6b2906e
Change-Id: I06232a0b0126349e7d4cffff0d9c1eac90eddbb2
Diffstat (limited to 'libAACenc')
-rw-r--r-- | libAACenc/src/metadata_main.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libAACenc/src/metadata_main.cpp b/libAACenc/src/metadata_main.cpp index e920793..90f8f4e 100644 --- a/libAACenc/src/metadata_main.cpp +++ b/libAACenc/src/metadata_main.cpp @@ -488,14 +488,12 @@ static FDK_METADATA_ERROR ProcessCompressor( { FDK_METADATA_ERROR err = METADATA_OK; - INT dynrng, compr; - DRC_PROFILE profileDrc = convertProfile(pMetadata->mpegDrc.drc_profile); - DRC_PROFILE profileComp = convertProfile(pMetadata->etsiAncData.comp_profile); - if ( (pMetadata==NULL) || (hDrcComp==NULL) ) { err = METADATA_INVALID_HANDLE; return err; } + DRC_PROFILE profileDrc = convertProfile(pMetadata->mpegDrc.drc_profile); + DRC_PROFILE profileComp = convertProfile(pMetadata->etsiAncData.comp_profile); /* first, check if profile is same as last frame * otherwise, update setup */ @@ -511,8 +509,8 @@ static FDK_METADATA_ERROR ProcessCompressor( } /* in case of embedding external values, copy this now (limiter may overwrite them) */ - dynrng = decodeDynrng(pMetadata->mpegDrc.dyn_rng_ctl[0], pMetadata->mpegDrc.dyn_rng_sgn[0]); - compr = decodeCompr(pMetadata->etsiAncData.compression_value); + INT dynrng = decodeDynrng(pMetadata->mpegDrc.dyn_rng_ctl[0], pMetadata->mpegDrc.dyn_rng_sgn[0]); + INT compr = decodeCompr(pMetadata->etsiAncData.compression_value); /* Call compressor */ if (FDK_DRC_Generator_Calc(hDrcComp, |