From: Rémi Bernon rbernon@codeweavers.com
--- dlls/mfreadwrite/reader.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/mfreadwrite/reader.c b/dlls/mfreadwrite/reader.c index 28858339d08..4d223f1de6e 100644 --- a/dlls/mfreadwrite/reader.c +++ b/dlls/mfreadwrite/reader.c @@ -2158,13 +2158,15 @@ static HRESULT source_reader_create_transform(struct source_reader *reader, BOOL
static HRESULT source_reader_create_decoder_for_stream(struct source_reader *reader, DWORD index, IMFMediaType *output_type) { - BOOL enable_advanced, allow_processor; + BOOL enable_advanced = FALSE, allow_processor = TRUE; struct media_stream *stream = &reader->streams[index]; IMFMediaType *input_type; unsigned int i = 0; + GUID major; HRESULT hr;
- allow_processor = source_reader_allow_video_processor(reader, &enable_advanced); + if (SUCCEEDED(IMFMediaType_GetMajorType(output_type, &major)) && IsEqualGUID(&major, &MFMediaType_Video)) + allow_processor = source_reader_allow_video_processor(reader, &enable_advanced);
while (SUCCEEDED(hr = source_reader_get_native_media_type(reader, index, i++, &input_type))) {
This merge request was approved by Nikolay Sivov.
I don't have an obvious test to verify this. Could you comment here with application name so we have some history?
Well, it was happening in Proton, with Resident Evil Village, but the use case is a bit specific because of how it handles its videos. It happens when the media source outputs raw float audio and PCM audio is requested as source reader output. I could probably add a test if we want to confirm it's supposed to work, but I don't think it's a big issue to automatically convert either and make it work regardless.