From ae9533fbfbe5feae5a674f432946b57678c566c4 Mon Sep 17 00:00:00 2001 From: Julius Schwartzenberg Date: Wed, 30 Dec 2009 02:44:29 +0100 Subject: avifile: Solve remaining playback issues that occured with irregular sized chunks --- dlls/avifil32/avifile.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c index fb47914..0dd91ff 100644 --- a/dlls/avifil32/avifile.c +++ b/dlls/avifil32/avifile.c @@ -2046,7 +2046,7 @@ static HRESULT AVIFILE_ReadBlock(IAVIStreamImpl *This, DWORD pos, size += 2 * sizeof(DWORD); /* check that buffer is big enough -- don't trust dwSuggestedBufferSize */ - if (This->lpBuffer == NULL || size < This->cbBuffer) { + if (This->lpBuffer == NULL || size > This->cbBuffer) { DWORD maxSize = max(size, This->sInfo.dwSuggestedBufferSize); if (This->lpBuffer == NULL) @@ -2055,7 +2055,7 @@ static HRESULT AVIFILE_ReadBlock(IAVIStreamImpl *This, DWORD pos, This->lpBuffer = HeapReAlloc(GetProcessHeap(), 0, This->lpBuffer, maxSize); if (This->lpBuffer == NULL) return AVIERR_MEMORY; - This->cbBuffer = max(size, This->sInfo.dwSuggestedBufferSize); + This->cbBuffer = maxSize; } /* now read the complete chunk into our buffer */ -- 1.6.3.3