dmime: Don't skip chunk for MIDI files.

MIDI files aren't RIFF, calling stream_skip_chunk on it is invalid.
This commit is contained in:
Yuxuan Shui 2024-02-16 17:01:08 +00:00 committed by Alexandre Julliard
parent c65ac223a0
commit 813b35c9d1

View file

@ -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);