msdmo: Only return valid GUIDs in IEnumDMO_Next().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
386c27084a
commit
351c8621b7
|
@ -117,6 +117,16 @@ static LPWSTR GUIDToString(LPWSTR lpwstr, REFGUID lpcguid)
|
||||||
return lpwstr;
|
return lpwstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static HRESULT string_to_guid(const WCHAR *string, GUID *guid)
|
||||||
|
{
|
||||||
|
WCHAR buffer[39];
|
||||||
|
buffer[0] = '{';
|
||||||
|
strcpyW(buffer + 1, string);
|
||||||
|
buffer[37] = '}';
|
||||||
|
buffer[38] = 0;
|
||||||
|
return CLSIDFromString(buffer, guid);
|
||||||
|
}
|
||||||
|
|
||||||
static BOOL IsMediaTypeEqual(const DMO_PARTIAL_MEDIATYPE* mt1, const DMO_PARTIAL_MEDIATYPE* mt2)
|
static BOOL IsMediaTypeEqual(const DMO_PARTIAL_MEDIATYPE* mt1, const DMO_PARTIAL_MEDIATYPE* mt2)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -514,6 +524,7 @@ static HRESULT WINAPI IEnumDMO_fnNext(
|
||||||
UINT count = 0;
|
UINT count = 0;
|
||||||
HRESULT hres = S_OK;
|
HRESULT hres = S_OK;
|
||||||
LONG ret;
|
LONG ret;
|
||||||
|
GUID guid;
|
||||||
|
|
||||||
IEnumDMOImpl *This = impl_from_IEnumDMO(iface);
|
IEnumDMOImpl *This = impl_from_IEnumDMO(iface);
|
||||||
|
|
||||||
|
@ -537,6 +548,9 @@ static HRESULT WINAPI IEnumDMO_fnNext(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (string_to_guid(szNextKey, &guid) != S_OK)
|
||||||
|
continue;
|
||||||
|
|
||||||
TRACE("found %s\n", debugstr_w(szNextKey));
|
TRACE("found %s\n", debugstr_w(szNextKey));
|
||||||
|
|
||||||
if (!(This->dwFlags & DMO_ENUMF_INCLUDE_KEYED))
|
if (!(This->dwFlags & DMO_ENUMF_INCLUDE_KEYED))
|
||||||
|
|
Loading…
Reference in New Issue