Connor McAdams : mfplat: Add support for AudioFormat_Float in MFCreateWaveFormatExFromMFMediaType.
Alexandre Julliard
julliard at winehq.org
Wed Apr 21 15:57:54 CDT 2021
Module: wine
Branch: master
Commit: 538b702c871aa262d117a10fb5bc02b543112981
URL: https://source.winehq.org/git/wine.git/?a=commit;h=538b702c871aa262d117a10fb5bc02b543112981
Author: Connor McAdams <cmcadams at codeweavers.com>
Date: Wed Apr 21 10:20:04 2021 -0400
mfplat: Add support for AudioFormat_Float in MFCreateWaveFormatExFromMFMediaType.
Add support for the MFAudioFormat_Float subtype in
MFCreateWaveFormatExFromMFMediaType.
Signed-off-by: Connor McAdams <cmcadams at codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mfplat/mediatype.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/mfplat/mediatype.c b/dlls/mfplat/mediatype.c
index c8028b2a46f..4904dbb566f 100644
--- a/dlls/mfplat/mediatype.c
+++ b/dlls/mfplat/mediatype.c
@@ -2884,7 +2884,7 @@ HRESULT WINAPI MFCreateWaveFormatExFromMFMediaType(IMFMediaType *mediatype, WAVE
if (!IsEqualGUID(&major, &MFMediaType_Audio))
return E_INVALIDARG;
- if (!IsEqualGUID(&subtype, &MFAudioFormat_PCM))
+ if (!IsEqualGUID(&subtype, &MFAudioFormat_PCM) && !IsEqualGUID(&subtype, &MFAudioFormat_Float))
{
FIXME("Unsupported audio format %s.\n", debugstr_guid(&subtype));
return E_NOTIMPL;
@@ -2908,7 +2908,12 @@ HRESULT WINAPI MFCreateWaveFormatExFromMFMediaType(IMFMediaType *mediatype, WAVE
memset(format, 0, *size);
- format->wFormatTag = format_ext ? WAVE_FORMAT_EXTENSIBLE : WAVE_FORMAT_PCM;
+ if (format_ext)
+ format->wFormatTag = WAVE_FORMAT_EXTENSIBLE;
+ else if (IsEqualGUID(&subtype, &MFAudioFormat_Float))
+ format->wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
+ else
+ format->wFormatTag = WAVE_FORMAT_PCM;
if (SUCCEEDED(IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_NUM_CHANNELS, &value)))
format->nChannels = value;
More information about the wine-cvs
mailing list