Julius Schwartzenberg : avifil32: Use chunksize specified by the chunk itself, avoids a noticable ticking sound heard when reading past the chunk boundary .
Module: wine Branch: master Commit: 7401af64e9a51bfe3fe6996e8d66f9c7fbfad47e URL: http://source.winehq.org/git/wine.git/?a=commit;h=7401af64e9a51bfe3fe6996e8d... Author: Julius Schwartzenberg <julius.schwartzenberg(a)gmail.com> Date: Wed Jan 20 22:57:27 2010 +0100 avifil32: Use chunksize specified by the chunk itself, avoids a noticable ticking sound heard when reading past the chunk boundary. --- dlls/avifil32/avifile.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c index e627196..702ba1c 100644 --- a/dlls/avifil32/avifile.c +++ b/dlls/avifil32/avifile.c @@ -1103,6 +1103,7 @@ static HRESULT WINAPI IAVIStream_fnRead(IAVIStream *iface, LONG start, samples *= This->sInfo.dwSampleSize; while (samples > 0 && buffersize > 0) { + LONG blocksize; if (block != This->dwCurrentFrame) { hr = AVIFILE_ReadBlock(This, block, NULL, 0); if (FAILED(hr)) @@ -1110,7 +1111,9 @@ static HRESULT WINAPI IAVIStream_fnRead(IAVIStream *iface, LONG start, } size = min((DWORD)samples, (DWORD)buffersize); - size = min(size, This->cbBuffer - offset); + blocksize = This->lpBuffer[1]; + TRACE("blocksize = %u\n",blocksize); + size = min(size, blocksize - offset); memcpy(buffer, ((BYTE*)&This->lpBuffer[2]) + offset, size); block++;
participants (1)
-
Alexandre Julliard