From 382a61391f30d0fd86e97a0a5d3b6c14d7a942cc Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Wed, 16 Apr 2008 14:24:16 -0700 Subject: [PATCH] quartz: Fix IMediaSample2 SetPreroll and SetSyncPoint. --- dlls/quartz/memallocator.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c index 6b68cf5ae19..b473b57e65e 100644 --- a/dlls/quartz/memallocator.c +++ b/dlls/quartz/memallocator.c @@ -586,7 +586,10 @@ static HRESULT WINAPI StdMediaSample2_SetSyncPoint(IMediaSample2 * iface, BOOL b TRACE("(%s)\n", bIsSyncPoint ? "TRUE" : "FALSE"); - This->props.dwSampleFlags = (This->props.dwSampleFlags & ~AM_SAMPLE_SPLICEPOINT) | bIsSyncPoint ? AM_SAMPLE_SPLICEPOINT : 0; + if (bIsSyncPoint) + This->props.dwSampleFlags |= AM_SAMPLE_SPLICEPOINT; + else + This->props.dwSampleFlags &= ~AM_SAMPLE_SPLICEPOINT; return S_OK; } @@ -606,7 +609,10 @@ static HRESULT WINAPI StdMediaSample2_SetPreroll(IMediaSample2 * iface, BOOL bIs TRACE("(%s)\n", bIsPreroll ? "TRUE" : "FALSE"); - This->props.dwSampleFlags = (This->props.dwSampleFlags & ~AM_SAMPLE_PREROLL) | bIsPreroll ? AM_SAMPLE_PREROLL : 0; + if (bIsPreroll) + This->props.dwSampleFlags &= ~AM_SAMPLE_PREROLL; + else + This->props.dwSampleFlags |= AM_SAMPLE_PREROLL; return S_OK; }