Merge branch 'wmreader' into 'master'

winegstreamer/wm_reader: Use codec format only for compressed types.

See merge request wine/wine!6447
This commit is contained in:
Ziqing Hui 2024-11-19 08:26:38 +00:00
commit 63aa55e300

View file

@ -554,7 +554,9 @@ static HRESULT WINAPI stream_props_GetMediaType(IWMMediaProps *iface, WM_MEDIA_T
TRACE("iface %p, mt %p, size %p.\n", iface, mt, size);
wg_parser_stream_get_codec_format(config->stream->wg_stream, &codec_format);
format = (codec_format.major_type != WG_MAJOR_TYPE_UNKNOWN) ? &codec_format : &config->stream->format;
format = (codec_format.major_type != WG_MAJOR_TYPE_UNKNOWN
&& codec_format.major_type != WG_MAJOR_TYPE_AUDIO
&& codec_format.major_type != WG_MAJOR_TYPE_VIDEO) ? &codec_format : &config->stream->format;
if (!amt_from_wg_format(&stream_mt, format, true))
return E_OUTOFMEMORY;