diff options
Diffstat (limited to 'src/plugins/Input')
| -rw-r--r-- | src/plugins/Input/aac/aacfile.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/plugins/Input/aac/aacfile.cpp b/src/plugins/Input/aac/aacfile.cpp index b9a537031..b452403b3 100644 --- a/src/plugins/Input/aac/aacfile.cpp +++ b/src/plugins/Input/aac/aacfile.cpp @@ -90,26 +90,23 @@ AACFile::AACFile(QIODevice *input, bool metaData, bool adts) unsigned int frame_length = ((((unsigned int)buf[adts_offset+3] & 0x3)) << 11) | (((unsigned int)buf[adts_offset+4]) << 3) | ((unsigned int)buf[adts_offset+5] >> 5); - if(frame_length == 0) - break; - - if(adts_offset + frame_length > buf_at - 6) - break; + if(frame_length == 0 || (adts_offset + frame_length > buf_at - 6)) + { + adts_offset++; + continue; + } //check second sync word if (((uchar)buf[adts_offset + frame_length] == 0xFF) && (((uchar)buf[adts_offset + frame_length + 1] & 0xF6) == 0xF0)) { qDebug("AACFile: ADTS header found"); + if (!input->isSequential() && adts) + parseADTS(); + m_isValid = true; + m_offset += adts_offset; + return; } - else - break; - - if (!input->isSequential() && adts) - parseADTS(); - m_isValid = true; - m_offset += adts_offset; - return; } adts_offset++; } |
