Michael Stefaniuc : quartz: Avoid a COM object => iface => object round trip.
Alexandre Julliard
julliard at winehq.org
Tue Jul 3 10:58:24 CDT 2012
Module: wine
Branch: master
Commit: f557ed6f944226f0f8b6ef03ee3d66bcb3abc07b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f557ed6f944226f0f8b6ef03ee3d66bcb3abc07b
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Tue Jul 3 00:17:23 2012 +0200
quartz: Avoid a COM object => iface => object round trip.
---
dlls/quartz/memallocator.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c
index f74a2fd..df4cf63 100644
--- a/dlls/quartz/memallocator.c
+++ b/dlls/quartz/memallocator.c
@@ -335,14 +335,14 @@ static HRESULT WINAPI BaseMemAllocator_GetBuffer(IMemAllocator * iface, IMediaSa
hr = VFW_E_TIMEOUT;
else
{
+ StdMediaSample2 *ms;
struct list * free = list_head(&This->free_list);
list_remove(free);
list_add_head(&This->used_list, free);
- *pSample = (IMediaSample *)LIST_ENTRY(free, StdMediaSample2, listentry);
-
- assert(((StdMediaSample2 *)*pSample)->ref == 0);
-
+ ms = LIST_ENTRY(free, StdMediaSample2, listentry);
+ assert(ms->ref == 0);
+ *pSample = (IMediaSample *)&ms->IMediaSample2_iface;
IMediaSample_AddRef(*pSample);
}
}
More information about the wine-cvs
mailing list