Nikolay Sivov : mfplat: Implement GetVideoFormat().
Alexandre Julliard
julliard at winehq.org
Tue Jun 23 15:52:52 CDT 2020
Module: wine
Branch: master
Commit: cb43efe901ab03bc90895b9559f501e8f035fce1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=cb43efe901ab03bc90895b9559f501e8f035fce1
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Tue Jun 23 14:29:05 2020 +0300
mfplat: Implement GetVideoFormat().
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mfplat/mediatype.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/mfplat/mediatype.c b/dlls/mfplat/mediatype.c
index 66722a84b6..843c09c5e0 100644
--- a/dlls/mfplat/mediatype.c
+++ b/dlls/mfplat/mediatype.c
@@ -38,6 +38,7 @@ struct media_type
struct attributes attributes;
IMFMediaType IMFMediaType_iface;
IMFVideoMediaType IMFVideoMediaType_iface;
+ MFVIDEOFORMAT *video_format;
};
struct stream_desc
@@ -648,6 +649,7 @@ static ULONG WINAPI video_mediatype_Release(IMFVideoMediaType *iface)
if (!refcount)
{
clear_attributes_object(&media_type->attributes);
+ CoTaskMemFree(media_type->video_format);
heap_free(media_type);
}
@@ -971,9 +973,17 @@ static HRESULT WINAPI video_mediatype_FreeRepresentation(IMFVideoMediaType *ifac
static const MFVIDEOFORMAT * WINAPI video_mediatype_GetVideoFormat(IMFVideoMediaType *iface)
{
- FIXME("%p.\n", iface);
+ struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
+ unsigned int size;
+ HRESULT hr;
+
+ TRACE("%p.\n", iface);
+
+ CoTaskMemFree(media_type->video_format);
+ if (FAILED(hr = MFCreateMFVideoFormatFromMFMediaType((IMFMediaType *)iface, &media_type->video_format, &size)))
+ WARN("Failed to create format description, hr %#x.\n", hr);
- return NULL;
+ return media_type->video_format;
}
static HRESULT WINAPI video_mediatype_GetVideoRepresentation(IMFVideoMediaType *iface, GUID representation,
More information about the wine-cvs
mailing list