Adjust the fix for infinite loops with a drained ADTS stream

This should have less risk of causing other issues.
This commit is contained in:
Martin Storsjo 2017-08-18 22:37:30 +03:00
parent 963b189156
commit a3d1168943
1 changed files with 3 additions and 1 deletions

View File

@ -342,7 +342,9 @@ TRANSPORTDEC_ERROR transportDec_FillData(
} }
} else { } else {
/* ... else feed bitbuffer with new stream data (append). */ /* ... else feed bitbuffer with new stream data (append). */
FDKfeedBuffer (hBs, pBuffer, bufferSize, pBytesValid); if ((hTp->numberOfRawDataBlocks <= 0) || (FDKgetValidBits(hBs)==0)) {
FDKfeedBuffer (hBs, pBuffer, bufferSize, pBytesValid) ;
}
} }
return TRANSPORTDEC_OK; return TRANSPORTDEC_OK;