Zebediah Figura : quartz/memallocator: Set the sample end time only if the start time is valid.
Alexandre Julliard
julliard at winehq.org
Mon Jun 24 16:06:21 CDT 2019
Module: wine
Branch: master
Commit: 646d3a103ec2460cfd5050fa1d9f2ded452836db
URL: https://source.winehq.org/git/wine.git/?a=commit;h=646d3a103ec2460cfd5050fa1d9f2ded452836db
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Fri Jun 21 22:35:42 2019 -0500
quartz/memallocator: Set the sample end time only if the start time is valid.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 be973b3..ac12abd 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 effb51d..b4f3b23 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;
More information about the wine-cvs
mailing list