Yuxuan Shui : dmime: Don't skip chunk for MIDI files.
Module: wine Branch: master Commit: 813b35c9d1045e1a39a5d14d36a11103fc30b15f URL: https://gitlab.winehq.org/wine/wine/-/commit/813b35c9d1045e1a39a5d14d36a1110... Author: Yuxuan Shui <yshui(a)codeweavers.com> Date: Fri Feb 16 17:01:08 2024 +0000 dmime: Don't skip chunk for MIDI files. MIDI files aren't RIFF, calling stream_skip_chunk on it is invalid. --- dlls/dmime/segment.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/dmime/segment.c b/dlls/dmime/segment.c index 82e06f4537d..b0485aaedd9 100644 --- a/dlls/dmime/segment.c +++ b/dlls/dmime/segment.c @@ -844,7 +844,9 @@ static HRESULT WINAPI segment_persist_stream_Load(IPersistStream *iface, IStream } } - stream_skip_chunk(stream, &chunk); + if (chunk.id != mmioFOURCC('M', 'T', 'h', 'd')) + stream_skip_chunk(stream, &chunk); + if (FAILED(hr)) { WARN("Failed to load segment from stream %p, hr %#lx\n", stream, hr);
participants (1)
-
Alexandre Julliard