Commit 175138a4 authored by Bruno Jesus's avatar Bruno Jesus Committed by Alexandre Julliard

avifil32: Absolute addresses already point to the correct place in the frame.

parent f8e3c1f7
......@@ -1987,13 +1987,17 @@ static HRESULT AVIFILE_ParseIndex(const IAVIFileImpl *This, AVIINDEXENTRY *lp,
if (nStream > This->fInfo.dwStreams)
return AVIERR_BADFORMAT;
/* Video frames can be either indexed in a relative position to the
* "movi" chunk or in a absolute position in the file. If the index
* is relative the frame offset will always be so small that it will
* virtually never reach the "movi" offset so we can detect if the
* video is relative very fast.
*/
if (*bAbsolute && lp->dwChunkOffset < This->dwMoviChunkPos)
*bAbsolute = FALSE;
if (*bAbsolute)
lp->dwChunkOffset += sizeof(DWORD);
else
lp->dwChunkOffset += pos;
if (!*bAbsolute)
lp->dwChunkOffset += pos; /* make the offset absolute */
if (FAILED(AVIFILE_AddFrame(This->ppStreams[nStream], lp->ckid, lp->dwChunkLength, lp->dwChunkOffset, lp->dwFlags)))
return AVIERR_MEMORY;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment