mirror of
https://github.com/mstorsjo/fdk-aac.git
synced 2025-06-05 22:39:13 +02:00
Prevent undefined syncLayerFrameBits in synchronization().
Bug: 146937540 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: Idaaa11d95c13220a9f96e6d73d4813492a740954
This commit is contained in:
committed by
Jean-Michel Trivi
parent
8caa63f329
commit
8fee7605df
@@ -981,6 +981,9 @@ static TRANSPORTDEC_ERROR transportDec_readHeader(
|
|||||||
CLatmDemux_GetNrOfSubFrames(&hTp->parser.latm);
|
CLatmDemux_GetNrOfSubFrames(&hTp->parser.latm);
|
||||||
if (hTp->transportFmt == TT_MP4_LOAS) {
|
if (hTp->transportFmt == TT_MP4_LOAS) {
|
||||||
syncLayerFrameBits -= startPos - (INT)FDKgetValidBits(hBs) - (13);
|
syncLayerFrameBits -= startPos - (INT)FDKgetValidBits(hBs) - (13);
|
||||||
|
if (syncLayerFrameBits <= 0) {
|
||||||
|
err = TRANSPORTDEC_SYNC_ERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -1271,8 +1274,9 @@ static TRANSPORTDEC_ERROR synchronization(HANDLE_TRANSPORTDEC hTp,
|
|||||||
if (!(hTp->flags & (TPDEC_LOST_FRAMES_PENDING | TPDEC_IGNORE_BUFFERFULLNESS |
|
if (!(hTp->flags & (TPDEC_LOST_FRAMES_PENDING | TPDEC_IGNORE_BUFFERFULLNESS |
|
||||||
TPDEC_SYNCOK)) &&
|
TPDEC_SYNCOK)) &&
|
||||||
err == TRANSPORTDEC_OK) {
|
err == TRANSPORTDEC_OK) {
|
||||||
err = additionalHoldOffNeeded(hTp, transportDec_GetBufferFullness(hTp),
|
err =
|
||||||
FDKgetValidBits(hBs) - syncLayerFrameBits);
|
additionalHoldOffNeeded(hTp, transportDec_GetBufferFullness(hTp),
|
||||||
|
(INT)FDKgetValidBits(hBs) - syncLayerFrameBits);
|
||||||
if (err == TRANSPORTDEC_NOT_ENOUGH_BITS) {
|
if (err == TRANSPORTDEC_NOT_ENOUGH_BITS) {
|
||||||
hTp->holdOffFrames++;
|
hTp->holdOffFrames++;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user