Nikolay Sivov : mf: Handle null marker context for sample grabber stream.
Alexandre Julliard
julliard at winehq.org
Fri Apr 24 15:11:39 CDT 2020
Module: wine
Branch: master
Commit: a12b5fe084510fab7f5b0e3a6665160becb59511
URL: https://source.winehq.org/git/wine.git/?a=commit;h=a12b5fe084510fab7f5b0e3a6665160becb59511
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Fri Apr 24 17:47:03 2020 +0300
mf: Handle null marker context for sample grabber stream.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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
More information about the wine-cvs
mailing list