Fix warnings and off-by-one in AAC
This commit is contained in:
1 parent
93f7d90baf
commit
e8e7acb884
7 files changed
+11
-4
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user