Commit 824d521d authored by Esme Povirk's avatar Esme Povirk Committed by Alexandre Julliard

windowscodecs: pceltFetched is optional in IWICEnumMetadataItem.

Spotted by Eric Pouech. Signed-off-by: 's avatarEsme Povirk <esme@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 7d118a25
...@@ -491,9 +491,13 @@ static HRESULT WINAPI MetadataHandlerEnum_Next(IWICEnumMetadataItem *iface, ...@@ -491,9 +491,13 @@ static HRESULT WINAPI MetadataHandlerEnum_Next(IWICEnumMetadataItem *iface,
ULONG new_index; ULONG new_index;
HRESULT hr=S_FALSE; HRESULT hr=S_FALSE;
ULONG i; ULONG i;
ULONG fetched;
TRACE("(%p,%li)\n", iface, celt); TRACE("(%p,%li)\n", iface, celt);
if (!pceltFetched)
pceltFetched = &fetched;
EnterCriticalSection(&This->parent->lock); EnterCriticalSection(&This->parent->lock);
if (This->index >= This->parent->item_count) if (This->index >= This->parent->item_count)
......
...@@ -303,6 +303,21 @@ static void test_metadata_unknown(void) ...@@ -303,6 +303,21 @@ static void test_metadata_unknown(void)
ok(hr == S_FALSE, "Next failed, hr=%lx\n", hr); ok(hr == S_FALSE, "Next failed, hr=%lx\n", hr);
ok(items_returned == 0, "unexpected item count %li\n", items_returned); ok(items_returned == 0, "unexpected item count %li\n", items_returned);
hr = IWICEnumMetadataItem_Reset(enumerator);
ok(hr == S_OK, "Reset failed, hr=%lx\n", hr);
hr = IWICEnumMetadataItem_Next(enumerator, 1, &schema, &id, NULL, NULL);
ok(hr == S_OK, "Next failed, hr=%lx\n", hr);
if (hr == S_OK)
{
ok(schema.vt == VT_EMPTY, "unexpected vt: %i\n", schema.vt);
ok(id.vt == VT_EMPTY, "unexpected vt: %i\n", id.vt);
PropVariantClear(&schema);
PropVariantClear(&id);
}
IWICEnumMetadataItem_Release(enumerator); IWICEnumMetadataItem_Release(enumerator);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment