winegstreamer: Always set the initial video type for the WMF reader to WG_VIDEO_FORMAT_BGR.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52273
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-12-29 22:04:35 -06:00 committed by Alexandre Julliard
parent 4d2a628dfe
commit 03d92af78a
2 changed files with 7 additions and 3 deletions

View File

@ -1503,9 +1503,11 @@ static HRESULT init_stream(struct wm_reader *reader, QWORD file_size)
{ {
/* Call of Juarez: Bound in Blood breaks if I420 is enumerated. /* Call of Juarez: Bound in Blood breaks if I420 is enumerated.
* Some native decoders output I420, but the msmpeg4v3 decoder * Some native decoders output I420, but the msmpeg4v3 decoder
* never does. */ * never does.
if (stream->format.u.video.format == WG_VIDEO_FORMAT_I420) *
stream->format.u.video.format = WG_VIDEO_FORMAT_YV12; * Shadowgrounds provides wmv3 video and assumes that the initial
* video type will be BGR. */
stream->format.u.video.format = WG_VIDEO_FORMAT_BGR;
} }
wg_parser_stream_enable(stream->wg_stream, &stream->format); wg_parser_stream_enable(stream->wg_stream, &stream->format);
} }

View File

@ -2388,6 +2388,8 @@ static void test_async_reader_types(void)
else else
{ {
ok(IsEqualGUID(&majortype, &MEDIATYPE_Video), "Got major type %s.\n", debugstr_guid(&majortype)); ok(IsEqualGUID(&majortype, &MEDIATYPE_Video), "Got major type %s.\n", debugstr_guid(&majortype));
/* Shadowgrounds assumes that the initial video type will be RGB24. */
ok(IsEqualGUID(&mt->subtype, &MEDIASUBTYPE_RGB24), "Got subtype %s.\n", debugstr_guid(&mt->subtype));
got_video = true; got_video = true;
check_video_type(mt); check_video_type(mt);
} }