From: Alex Henrie alexhenrie24@gmail.com
--- dlls/winegstreamer/resampler.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/winegstreamer/resampler.c b/dlls/winegstreamer/resampler.c index a9c9ae32e8a..cc43c033d42 100644 --- a/dlls/winegstreamer/resampler.c +++ b/dlls/winegstreamer/resampler.c @@ -275,7 +275,10 @@ static HRESULT get_available_media_type(DWORD index, IMFMediaType **type, BOOL o *type = NULL;
if (index >= (output ? 2 : 1) * ARRAY_SIZE(audio_formats)) - return MF_E_NO_MORE_TYPES; + { + hr = MF_E_NO_MORE_TYPES; + goto done; + } subtype = audio_formats[index % ARRAY_SIZE(audio_formats)];
if (FAILED(hr = IMFMediaType_SetGUID(media_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio)))
Rémi Bernon (@rbernon) commented about dlls/winegstreamer/resampler.c:
*type = NULL; if (index >= (output ? 2 : 1) * ARRAY_SIZE(audio_formats))
return MF_E_NO_MORE_TYPES;
- {
hr = MF_E_NO_MORE_TYPES;
goto done;
- } subtype = audio_formats[index % ARRAY_SIZE(audio_formats)];
Probably better to move that `MFCreateMediaType` down after the subtype is checked.
On Wed Sep 28 09:38:07 2022 +0000, Rémi Bernon wrote:
Probably better to move that `MFCreateMediaType` down after the subtype is checked.
That sounds fine. Should `*type = NULL;` stay above the subtype check?
On Wed Sep 28 15:46:36 2022 +0000, Alex Henrie wrote:
That sounds fine. Should `*type = NULL;` stay above the subtype check?
Yes.