Fix warnings and off-by-one in AAC

This commit is contained in:
Earle F. Philhower, III committed 2018-01-21 19:27:07 -08:00
1 parent 93f7d90baf
commit e8e7acb884
7 files changed
+11 -4

No files matched your search

+1 -1
View File
@@ -117,7 +117,7 @@ bool AudioGeneratorAAC::FillBufferWithValidFrame()
if (nextSync >= 0) nextSync += lastFrameEnd;
lastFrameEnd = 0;
if (nextSync == -1) {
if (buff[buffValid-1]==0xff) { // Could be 1st half of syncword, preserve it...
if (buffValid && buff[buffValid-1]==0xff) { // Could be 1st half of syncword, preserve it...
buff[0] = 0xff;
buffValid = file->read(buff+1, buffLen-1);
if (buffValid==0) return false; // No data available, EOF