Commit 460ae3d8 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmime: Accept a DMUS_IO_SEGMENT_HEADER without rtPlayStart field.

Tron 2.0 has a segment header of 56, so is missing the rtPlayStart field. Based on a patch by Alistair Leslie-Hughes. Signed-off-by: 's avatarMichael Stefaniuc <mstefani@winehq.org> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent fbb63375
......@@ -727,7 +727,8 @@ static inline void dump_segment_header(DMUS_IO_SEGMENT_HEADER *h, DWORD size)
if (dx == 9) {
TRACE("\trtLoopStart: %s\n", wine_dbgstr_longlong(h->rtLoopStart));
TRACE("\trtLoopEnd: %s\n", wine_dbgstr_longlong(h->rtLoopEnd));
TRACE("\trtPlayStart: %s\n", wine_dbgstr_longlong(h->rtPlayStart));
if (size > offsetof(DMUS_IO_SEGMENT_HEADER, rtPlayStart))
TRACE("\trtPlayStart: %s\n", wine_dbgstr_longlong(h->rtPlayStart));
}
}
......@@ -742,8 +743,11 @@ static HRESULT parse_segment_form(IDirectMusicSegment8Impl *This, IStream *strea
while ((hr = stream_next_chunk(stream, &chunk)) == S_OK) {
switch (chunk.id) {
case DMUS_FOURCC_SEGMENT_CHUNK:
/* DX9 without rtPlayStart field */
if (chunk.size == offsetof(DMUS_IO_SEGMENT_HEADER, rtPlayStart))
WARN("Missing rtPlayStart field in %s\n", debugstr_chunk(&chunk));
/* DX7, DX8 and DX9 structure sizes */
if (chunk.size != offsetof(DMUS_IO_SEGMENT_HEADER, rtLength) &&
else if (chunk.size != offsetof(DMUS_IO_SEGMENT_HEADER, rtLength) &&
chunk.size != offsetof(DMUS_IO_SEGMENT_HEADER, rtLoopStart) &&
chunk.size != sizeof(DMUS_IO_SEGMENT_HEADER)) {
WARN("Invalid size of %s\n", debugstr_chunk(&chunk));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment