Commit c53a803a authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

quartz: Fix checking for duration.

parent d38b8502
...@@ -1914,8 +1914,8 @@ static HRESULT WINAPI FoundDuration(IFilterGraphImpl *This, IMediaSeeking *seek, ...@@ -1914,8 +1914,8 @@ static HRESULT WINAPI FoundDuration(IFilterGraphImpl *This, IMediaSeeking *seek,
if (FAILED(hr)) if (FAILED(hr))
return hr; return hr;
/* FIXME: Minimum or maximum duration? */ /* FIXME: Minimum or maximum duration? Assuming minimum */
if (!*pdur < duration) if (duration > 0 && *pdur < duration)
*pdur = duration; *pdur = duration;
return hr; return hr;
...@@ -1932,10 +1932,11 @@ static HRESULT WINAPI MediaSeeking_GetDuration(IMediaSeeking *iface, ...@@ -1932,10 +1932,11 @@ static HRESULT WINAPI MediaSeeking_GetDuration(IMediaSeeking *iface,
return E_POINTER; return E_POINTER;
EnterCriticalSection(&This->cs); EnterCriticalSection(&This->cs);
*pDuration = 0; *pDuration = -1;
hr = all_renderers_seek(This, FoundDuration, (DWORD_PTR)pDuration); hr = all_renderers_seek(This, FoundDuration, (DWORD_PTR)pDuration);
LeaveCriticalSection(&This->cs); LeaveCriticalSection(&This->cs);
TRACE("--->%08x\n", hr);
return hr; return hr;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment