[PATCH 1/2] mf: Handle null marker context for sample grabber stream.
Nikolay Sivov
nsivov at codeweavers.com
Fri Apr 24 09:47:03 CDT 2020
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
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 21f89c0ad0..2167b5001e 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
--
2.26.2
More information about the wine-devel
mailing list