In AVI file header, 'cbSize' might be omitted for PCM audio types.

BUG = issue 671
TEST = Manual test
Review URL: https://webrtc-codereview.appspot.com/705012

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2641 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
braveyao@webrtc.org 2012-08-20 03:58:41 +00:00
parent f7a58f868e
commit 617e23cee6

View File

@ -1651,7 +1651,9 @@ WebRtc_Word32 AviFile::ReadAVIAudioStreamHeader(WebRtc_Word32 endpos)
_bytesRead += GetLE32(_audioFormatHeader.nAvgBytesPerSec);
_bytesRead += GetLE16(_audioFormatHeader.nBlockAlign);
_bytesRead += GetLE16(_audioFormatHeader.wBitsPerSample);
_bytesRead += GetLE16(_audioFormatHeader.cbSize);
if (chunksize > 0x10) {
_bytesRead += GetLE16(_audioFormatHeader.cbSize);
}
const WebRtc_UWord32 diffRead = chunksize - (_bytesRead - startRead);
if (diffRead > 0)