diff options
author | Chih-Hung Hsieh <chh@google.com> | 2014-11-12 10:09:10 -0800 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2014-12-01 11:26:03 -0800 |
commit | bb1e78a118cab7358b4f5e0cd5c8c21d95576936 (patch) | |
tree | 802bd070d3c7633ee8994874259e0838e00db285 /libMpegTPDec/src | |
parent | 84851b23d6f65ce03da4fa8ef2348b4f46c0ed0f (diff) | |
download | fdk-aac-bb1e78a118cab7358b4f5e0cd5c8c21d95576936.tar.gz fdk-aac-bb1e78a118cab7358b4f5e0cd5c8c21d95576936.tar.bz2 fdk-aac-bb1e78a118cab7358b4f5e0cd5c8c21d95576936.zip |
Fix checks for {Front,Side,Back}ElementIsCpe
{Front,Side,Back}ElementIsCpe is an array (per-channel). The check for
pPce->{Front,Side,Back}ElementIsCpe without an index checks the address
of the array, and will always evaluate to true. The elTagSce++
statements are unreachable.
Change-Id: If530371788a44038c500d6f9f7ac67681f77cc71
Diffstat (limited to 'libMpegTPDec/src')
-rw-r--r-- | libMpegTPDec/src/tpdec_asc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libMpegTPDec/src/tpdec_asc.cpp b/libMpegTPDec/src/tpdec_asc.cpp index 82adec1..bae271e 100644 --- a/libMpegTPDec/src/tpdec_asc.cpp +++ b/libMpegTPDec/src/tpdec_asc.cpp @@ -449,13 +449,13 @@ void CProgramConfig_GetDefault( CProgramConfig *pPce, int el, elTagSce = 0, elTagCpe = 0; for (el = 0; el < pPce->NumFrontChannelElements; el += 1) { - pPce->FrontElementTagSelect[el] = (pPce->FrontElementIsCpe) ? elTagCpe++ : elTagSce++; + pPce->FrontElementTagSelect[el] = (pPce->FrontElementIsCpe[el]) ? elTagCpe++ : elTagSce++; } for (el = 0; el < pPce->NumSideChannelElements; el += 1) { - pPce->SideElementTagSelect[el] = (pPce->SideElementIsCpe) ? elTagCpe++ : elTagSce++; + pPce->SideElementTagSelect[el] = (pPce->SideElementIsCpe[el]) ? elTagCpe++ : elTagSce++; } for (el = 0; el < pPce->NumBackChannelElements; el += 1) { - pPce->BackElementTagSelect[el] = (pPce->BackElementIsCpe) ? elTagCpe++ : elTagSce++; + pPce->BackElementTagSelect[el] = (pPce->BackElementIsCpe[el]) ? elTagCpe++ : elTagSce++; } elTagSce = 0; for (el = 0; el < pPce->NumLfeChannelElements; el += 1) { |