Maarten Lankhorst : quartz: Fix IMediaSample2 SetPreroll and SetSyncPoint.

Alexandre Julliard julliard at winehq.org
Thu Apr 17 07:38:34 CDT 2008


Module: wine
Branch: master
Commit: 382a61391f30d0fd86e97a0a5d3b6c14d7a942cc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=382a61391f30d0fd86e97a0a5d3b6c14d7a942cc

Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date:   Wed Apr 16 14:24:16 2008 -0700

quartz: Fix IMediaSample2 SetPreroll and SetSyncPoint.

---

 dlls/quartz/memallocator.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c
index 6b68cf5..b473b57 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;
 }




More information about the wine-cvs mailing list