Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/memallocator.c | 28 ++++++++++++++-------------- dlls/quartz/tests/memallocator.c | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c index be973b30c58..ac12abd6e58 100644 --- a/dlls/quartz/memallocator.c +++ b/dlls/quartz/memallocator.c @@ -560,27 +560,27 @@ static HRESULT WINAPI StdMediaSample2_GetTime(IMediaSample2 * iface, REFERENCE_T return hr; }
-static HRESULT WINAPI StdMediaSample2_SetTime(IMediaSample2 * iface, REFERENCE_TIME * pStart, REFERENCE_TIME * pEnd) +static HRESULT WINAPI StdMediaSample2_SetTime(IMediaSample2 *iface, REFERENCE_TIME *start, REFERENCE_TIME *end) { - StdMediaSample2 *This = impl_from_IMediaSample2(iface); + StdMediaSample2 *sample = impl_from_IMediaSample2(iface);
- TRACE("(%p)->(%p, %p)\n", iface, pStart, pEnd); + TRACE("iface %p, start %p, end %p.\n", iface, start, end);
- if (pStart) + if (start) { - This->props.tStart = *pStart; - This->props.dwSampleFlags |= AM_SAMPLE_TIMEVALID; - } - else - This->props.dwSampleFlags &= ~AM_SAMPLE_TIMEVALID; + sample->props.tStart = *start; + sample->props.dwSampleFlags |= AM_SAMPLE_TIMEVALID;
- if (pEnd) - { - This->props.tStop = *pEnd; - This->props.dwSampleFlags |= AM_SAMPLE_STOPVALID; + if (end) + { + sample->props.tStop = *end; + sample->props.dwSampleFlags |= AM_SAMPLE_STOPVALID; + } + else + sample->props.dwSampleFlags &= ~AM_SAMPLE_STOPVALID; } else - This->props.dwSampleFlags &= ~AM_SAMPLE_STOPVALID; + sample->props.dwSampleFlags &= ~(AM_SAMPLE_TIMEVALID | AM_SAMPLE_STOPVALID);
return S_OK; } diff --git a/dlls/quartz/tests/memallocator.c b/dlls/quartz/tests/memallocator.c index eb1c2428e33..92e2d45a0d0 100644 --- a/dlls/quartz/tests/memallocator.c +++ b/dlls/quartz/tests/memallocator.c @@ -245,7 +245,7 @@ static void test_sample_time(void)
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(!props.dwSampleFlags, "Got flags %#x.\n", props.dwSampleFlags); + ok(!props.dwSampleFlags, "Got flags %#x.\n", props.dwSampleFlags);
start = 0x123; end = 0x321;