Commit 44318fee authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz/memallocator: Forbid setting the start media time without setting the end time.

parent da6afd5c
......@@ -734,21 +734,20 @@ static HRESULT WINAPI StdMediaSample2_GetMediaTime(IMediaSample2 * iface, LONGLO
return S_OK;
}
static HRESULT WINAPI StdMediaSample2_SetMediaTime(IMediaSample2 * iface, LONGLONG * pStart, LONGLONG * pEnd)
static HRESULT WINAPI StdMediaSample2_SetMediaTime(IMediaSample2 *iface, LONGLONG *start, LONGLONG *end)
{
StdMediaSample2 *This = impl_from_IMediaSample2(iface);
TRACE("(%p)->(%p, %p)\n", iface, pStart, pEnd);
StdMediaSample2 *sample = impl_from_IMediaSample2(iface);
if (pStart)
This->tMediaStart = *pStart;
else
This->tMediaStart = INVALID_MEDIA_TIME;
TRACE("sample %p, start %p, end %p.\n", iface, start, end);
if (pEnd)
This->tMediaEnd = *pEnd;
if (start)
{
if (!end) return E_POINTER;
sample->tMediaStart = *start;
sample->tMediaEnd = *end;
}
else
This->tMediaEnd = 0;
sample->tMediaStart = INVALID_MEDIA_TIME;
return S_OK;
}
......
......@@ -379,7 +379,7 @@ static void test_media_time(void)
{
start = 0x123;
hr = IMediaSample_SetMediaTime(sample, &start, NULL);
todo_wine ok(hr == E_POINTER, "Got hr %#x.\n", hr);
ok(hr == E_POINTER, "Got hr %#x.\n", hr);
}
end = 0x321;
......
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