Commit b44fb047 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

windowscodecs: Use IWICComponentFactory_CreateQueryReaderFromBlockReader in GetMetadataQueryReader.

Instead of MetadataQueryReader_CreateInstance. Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarEsme Povirk <esme@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 8fad0b14
......@@ -433,6 +433,8 @@ static HRESULT WINAPI CommonDecoderFrame_GetMetadataQueryReader(IWICBitmapFrameD
IWICMetadataQueryReader **ppIMetadataQueryReader)
{
CommonDecoderFrame *This = impl_from_IWICBitmapFrameDecode(iface);
IWICComponentFactory* factory;
HRESULT hr;
TRACE("(%p,%p)\n", iface, ppIMetadataQueryReader);
......@@ -442,7 +444,18 @@ static HRESULT WINAPI CommonDecoderFrame_GetMetadataQueryReader(IWICBitmapFrameD
if (!(This->parent->file_info.flags & WICBitmapDecoderCapabilityCanEnumerateMetadata))
return WINCODEC_ERR_UNSUPPORTEDOPERATION;
return MetadataQueryReader_CreateInstance(&This->IWICMetadataBlockReader_iface, NULL, ppIMetadataQueryReader);
hr = create_instance(&CLSID_WICImagingFactory, &IID_IWICComponentFactory, (void**)&factory);
if (SUCCEEDED(hr))
{
hr = IWICComponentFactory_CreateQueryReaderFromBlockReader(factory, &This->IWICMetadataBlockReader_iface, ppIMetadataQueryReader);
IWICComponentFactory_Release(factory);
}
if (FAILED(hr))
*ppIMetadataQueryReader = NULL;
return hr;
}
static HRESULT WINAPI CommonDecoderFrame_GetColorContexts(IWICBitmapFrameDecode *iface,
......
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