From a12b5fe084510fab7f5b0e3a6665160becb59511 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Fri, 24 Apr 2020 17:47:03 +0300 Subject: [PATCH] mf: Handle null marker context for sample grabber stream. Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/mf/samplegrabber.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/mf/samplegrabber.c b/dlls/mf/samplegrabber.c index 21f89c0ad06..2167b5001eb 100644 --- a/dlls/mf/samplegrabber.c +++ b/dlls/mf/samplegrabber.c @@ -446,7 +446,7 @@ static HRESULT stream_place_marker(struct sample_grabber *grabber, MFSTREAMSINK_ const PROPVARIANT *context_value) { struct scheduled_item *item; - HRESULT hr; + HRESULT hr = S_OK; if (list_empty(&grabber->items)) { @@ -460,7 +460,9 @@ static HRESULT stream_place_marker(struct sample_grabber *grabber, MFSTREAMSINK_ item->type = ITEM_TYPE_MARKER; item->u.marker.type = marker_type; list_init(&item->entry); - hr = PropVariantCopy(&item->u.marker.context, context_value); + PropVariantInit(&item->u.marker.context); + if (context_value) + hr = PropVariantCopy(&item->u.marker.context, context_value); if (SUCCEEDED(hr)) list_add_tail(&grabber->items, &item->entry); else