On 8/9/22 08:36, Zhiyi Zhang wrote:
mf_media_type_from_wg_format() may return NULL.
Fix Airborne Kingdom crash at start because WG_AUDIO_FORMAT_UNKNOWN is passed to mf_media_type_from_wg_format().
This patch is probably a good idea regardless, but it also leads me to ask: what format does the file actually have, and should we translate that into Win32 type information?
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c index f07b83f413e..5961097b643 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c @@ -879,6 +879,9 @@ static HRESULT media_stream_init_desc(struct media_stream *stream) IMFMediaType *base_type = mf_media_type_from_wg_format(&format); GUID base_subtype;
if (!base_type)
goto done;
IMFMediaType_GetGUID(base_type, &MF_MT_SUBTYPE, &base_subtype); stream_types[0] = base_type;
This will return an uninitialized "hr".