Signed-off-by: Derek Lesho dlesho@codeweavers.com --- dlls/winegstreamer/mfplat.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c index ffef9d4c08..62f10a13b9 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c @@ -833,6 +833,24 @@ GstCaps *caps_from_media_type(IMFMediaType *type) gst_caps_set_simple(output, "level", G_TYPE_STRING, level, NULL); } } + else if (IsEqualGUID(&subtype, &MFVideoFormat_WVC1)) + { + BYTE *user_data; + DWORD user_data_size; + output = gst_caps_new_empty_simple("video/x-wmv"); + gst_caps_set_simple(output, "format", G_TYPE_STRING, "WVC1", NULL); + + gst_caps_set_simple(output, "wmvversion", G_TYPE_INT, 3, NULL); + + if (SUCCEEDED(IMFMediaType_GetAllocatedBlob(type, &MF_MT_USER_DATA, &user_data, &user_data_size))) + { + GstBuffer *codec_data_buffer = gst_buffer_new_allocate(NULL, user_data_size, NULL); + gst_buffer_fill(codec_data_buffer, 0, user_data, user_data_size); + gst_caps_set_simple(output, "codec_data", GST_TYPE_BUFFER, codec_data_buffer, NULL); + gst_buffer_unref(codec_data_buffer); + CoTaskMemFree(user_data); + } + } else { ERR("Unrecognized subtype %s\n", debugstr_guid(&subtype)); return NULL;