The MainAVIHeader structure contains global information for the entire AVI file. It is contained within an 'avih' chunk within the LIST 'hdrl' chunk at the beginning of an AVI RIFF file.
typedef sturct { ULONG ulMicroSecPerFrame; ULONG ulMaxBytesPerSec; ULONG ulReserved1; ULONG ulFlags; ULONG ulTotalFrames; ULONG ulInitialFrames; ULONG ulStreams; ULONG ulSuggestedBufferSize; ULONG ulWidth; ULONG ulHeight; ULONG ulReserved {4} } MainAVIHeader;
The MainAVIHeader structure has the following fields:
Field
AVIF_HASINDEX
For an interleaved file, this buffer size should be large enough to read an entire record and not just a chunk.