From: R��mi Bernon rbernon@codeweavers.com
--- dlls/winegstreamer/color_convert.c | 4 ++++ dlls/winegstreamer/h264_decoder.c | 4 ++++ dlls/winegstreamer/resampler.c | 4 ++++ dlls/winegstreamer/video_processor.c | 4 ++++ dlls/winegstreamer/wma_decoder.c | 10 +++++++--- 5 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/dlls/winegstreamer/color_convert.c b/dlls/winegstreamer/color_convert.c index b47832b2c30..81067d052f7 100644 --- a/dlls/winegstreamer/color_convert.c +++ b/dlls/winegstreamer/color_convert.c @@ -401,6 +401,8 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM break; if (i == ARRAY_SIZE(input_types)) return MF_E_INVALIDMEDIATYPE; + if (flags & MFT_SET_TYPE_TEST_ONLY) + return S_OK;
if (!impl->input_type && FAILED(hr = MFCreateMediaType(&impl->input_type))) return hr; @@ -444,6 +446,8 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF break; if (i == ARRAY_SIZE(output_types)) return MF_E_INVALIDMEDIATYPE; + if (flags & MFT_SET_TYPE_TEST_ONLY) + return S_OK;
if (!impl->output_type && FAILED(hr = MFCreateMediaType(&impl->output_type))) return hr; diff --git a/dlls/winegstreamer/h264_decoder.c b/dlls/winegstreamer/h264_decoder.c index 43b8f83a20c..c6098aee302 100644 --- a/dlls/winegstreamer/h264_decoder.c +++ b/dlls/winegstreamer/h264_decoder.c @@ -419,6 +419,8 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM break; if (i == ARRAY_SIZE(h264_decoder_input_types)) return MF_E_INVALIDMEDIATYPE; + if (flags & MFT_SET_TYPE_TEST_ONLY) + return S_OK;
if (decoder->output_type) { @@ -469,6 +471,8 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF || (frame_size >> 32) != decoder->wg_format.u.video.width || (UINT32)frame_size != decoder->wg_format.u.video.height) return MF_E_INVALIDMEDIATYPE; + if (flags & MFT_SET_TYPE_TEST_ONLY) + return S_OK;
if (decoder->output_type) IMFMediaType_Release(decoder->output_type); diff --git a/dlls/winegstreamer/resampler.c b/dlls/winegstreamer/resampler.c index 65a29d96794..1d35775af68 100644 --- a/dlls/winegstreamer/resampler.c +++ b/dlls/winegstreamer/resampler.c @@ -383,6 +383,8 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM
if (FAILED(hr = check_media_type(type))) return hr; + if (flags & MFT_SET_TYPE_TEST_ONLY) + return S_OK;
if (!impl->input_type && FAILED(hr = MFCreateMediaType(&impl->input_type))) return hr; @@ -414,6 +416,8 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF
if (FAILED(hr = check_media_type(type))) return hr; + if (flags & MFT_SET_TYPE_TEST_ONLY) + return S_OK;
if (!impl->output_type && FAILED(hr = MFCreateMediaType(&impl->output_type))) return hr; diff --git a/dlls/winegstreamer/video_processor.c b/dlls/winegstreamer/video_processor.c index a271ca9231f..4094ecd2bdd 100644 --- a/dlls/winegstreamer/video_processor.c +++ b/dlls/winegstreamer/video_processor.c @@ -376,6 +376,8 @@ static HRESULT WINAPI video_processor_SetInputType(IMFTransform *iface, DWORD id break; if (i == ARRAY_SIZE(input_types)) return MF_E_INVALIDMEDIATYPE; + if (flags & MFT_SET_TYPE_TEST_ONLY) + return S_OK;
if (impl->input_type) IMFMediaType_Release(impl->input_type); @@ -413,6 +415,8 @@ static HRESULT WINAPI video_processor_SetOutputType(IMFTransform *iface, DWORD i break; if (i == ARRAY_SIZE(output_types)) return MF_E_INVALIDMEDIATYPE; + if (flags & MFT_SET_TYPE_TEST_ONLY) + return S_OK;
if (impl->output_type) IMFMediaType_Release(impl->output_type); diff --git a/dlls/winegstreamer/wma_decoder.c b/dlls/winegstreamer/wma_decoder.c index e2a7a770826..31fb49df1f7 100644 --- a/dlls/winegstreamer/wma_decoder.c +++ b/dlls/winegstreamer/wma_decoder.c @@ -387,6 +387,8 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM if (FAILED(IMFMediaType_GetItemType(type, &MF_MT_AUDIO_NUM_CHANNELS, &item_type)) || item_type != MF_ATTRIBUTE_UINT32) return MF_E_INVALIDMEDIATYPE; + if (flags & MFT_SET_TYPE_TEST_ONLY) + return S_OK;
if (!decoder->input_type && FAILED(hr = MFCreateMediaType(&decoder->input_type))) return hr; @@ -443,9 +445,6 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF return hr; }
- if (FAILED(IMFMediaType_SetUINT32(decoder->input_type, &MF_MT_AUDIO_BITS_PER_SAMPLE, sample_size))) - return MF_E_INVALIDMEDIATYPE; - if (FAILED(IMFMediaType_GetItemType(type, &MF_MT_AUDIO_AVG_BYTES_PER_SECOND, &item_type)) || item_type != MF_ATTRIBUTE_UINT32) return MF_E_INVALIDMEDIATYPE; @@ -461,6 +460,11 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF if (FAILED(IMFMediaType_GetItemType(type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &item_type)) || item_type != MF_ATTRIBUTE_UINT32) return MF_E_INVALIDMEDIATYPE; + if (flags & MFT_SET_TYPE_TEST_ONLY) + return S_OK; + + if (FAILED(IMFMediaType_SetUINT32(decoder->input_type, &MF_MT_AUDIO_BITS_PER_SAMPLE, sample_size))) + return MF_E_INVALIDMEDIATYPE;
if (!decoder->output_type && FAILED(hr = MFCreateMediaType(&decoder->output_type))) return hr;