From 8bd54ebb11a0f98c89747f045beca106f59a05a7 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Mon, 23 Jun 2008 12:08:10 -0700 Subject: [PATCH] quartz: Make the memory allocator emit more warning messages --- dlls/quartz/memallocator.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c index 7969193..f122576 100644 --- a/dlls/quartz/memallocator.c +++ b/dlls/quartz/memallocator.c @@ -289,7 +289,10 @@ static HRESULT WINAPI BaseMemAllocator_GetBuffer(IMemAllocator * iface, IMediaSa EnterCriticalSection(This->pCritSect); if (!This->bCommitted || This->bDecommitQueued) + { + WARN("Not committed\n"); hr = VFW_E_NOT_COMMITTED; + } else ++This->lWaiting; LeaveCriticalSection(This->pCritSect); @@ -299,6 +302,7 @@ static HRESULT WINAPI BaseMemAllocator_GetBuffer(IMemAllocator * iface, IMediaSa if (WaitForSingleObject(This->hSemWaiting, (dwFlags & AM_GBF_NOWAIT) ? 0 : INFINITE) != WAIT_OBJECT_0) { InterlockedDecrement(&This->lWaiting); + WARN("Timed out\n"); return VFW_E_TIMEOUT; } @@ -324,6 +328,8 @@ static HRESULT WINAPI BaseMemAllocator_GetBuffer(IMemAllocator * iface, IMediaSa } LeaveCriticalSection(This->pCritSect); + if (hr != S_OK) + WARN("%08x\n", hr); return hr; } @@ -614,7 +620,10 @@ static HRESULT WINAPI StdMediaSample2_SetActualDataLength(IMediaSample2 * iface, TRACE("(%d)\n", len); if ((len > This->props.cbBuffer) || (len < 0)) + { + WARN("Tried to set length to %d, while max is %d\n", len, This->props.cbBuffer); return VFW_E_BUFFER_OVERFLOW; + } else { This->props.lActual = len; -- 1.5.4.1