Module: wine Branch: master Commit: 175138a42c83f10df1d7529f9c46ef1f3dd25f5d URL: http://source.winehq.org/git/wine.git/?a=commit;h=175138a42c83f10df1d7529f9c...
Author: Bruno Jesus 00cpxxx@gmail.com Date: Sun Oct 18 01:05:39 2015 +0800
avifil32: Absolute addresses already point to the correct place in the frame.
Signed-off-by: Bruno Jesus 00cpxxx@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/avifil32/avifile.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c index f5abc1c..f649d05 100644 --- a/dlls/avifil32/avifile.c +++ b/dlls/avifil32/avifile.c @@ -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;