http://bugs.winehq.org/show_bug.cgi?id=13892
--- Comment #3 from Eric Work work.eric@gmail.com 2008-06-14 13:19:52 --- Created an attachment (id=14020) --> (http://bugs.winehq.org/attachment.cgi?id=14020) Additional Fixes for MMIO_Open
This patch includes the fixes from the previous patch.
It turns out that MMIO_SetBuffer (called from MMIO_Open) does free the internal buffer because of the MMIO_ALLOCBUF flag, but the internal buffer is already NULL so it has no effect and the flag is cleared anyways after this is done. The application supplied buffer was indeed being used and not deallocated (like I thought). Without the previous patch running wine with trace+mmio would cause a GPF due to the buffer size being set incorrectly (relative to the application supplied buffer) to MMIO_DEFAULTBUFFER every time and this caused problems with mmioDescend it seems. The problem in the end was that wm->bBufferLoaded was not being set to TRUE for the MMIO_ALLOCBUF case causing MMIO_SEEK to fail and then mmioDescend never finds the RIFF data.