Module: wine Branch: master Commit: daaf546f42f7c3956af00ae40f14ca24b15cf49f URL: https://source.winehq.org/git/wine.git/?a=commit;h=daaf546f42f7c3956af00ae40...
Author: Zebediah Figura z.figura12@gmail.com Date: Mon Jun 24 20:05:19 2019 -0500
quartz/memallocator: Set the AM_SAMPLE_TYPECHANGED flag.
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/quartz/memallocator.c | 7 +++++++ dlls/quartz/tests/memallocator.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c index 91c2373..5ac8a72 100644 --- a/dlls/quartz/memallocator.c +++ b/dlls/quartz/memallocator.c @@ -685,8 +685,15 @@ static HRESULT WINAPI StdMediaSample2_SetMediaType(IMediaSample2 * iface, AM_MED DeleteMediaType(This->props.pMediaType); This->props.pMediaType = NULL; } + if (!pMediaType) + { + This->props.dwSampleFlags &= ~AM_SAMPLE_TYPECHANGED; return S_OK; + } + + This->props.dwSampleFlags |= AM_SAMPLE_TYPECHANGED; + if (!(This->props.pMediaType = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE)))) return E_OUTOFMEMORY;
diff --git a/dlls/quartz/tests/memallocator.c b/dlls/quartz/tests/memallocator.c index 9bbfd42..164f3af 100644 --- a/dlls/quartz/tests/memallocator.c +++ b/dlls/quartz/tests/memallocator.c @@ -509,7 +509,7 @@ static void test_sample_properties(void)
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(props.dwSampleFlags == AM_SAMPLE_TYPECHANGED, "Got flags %#x.\n", props.dwSampleFlags); + ok(props.dwSampleFlags == AM_SAMPLE_TYPECHANGED, "Got flags %#x.\n", props.dwSampleFlags); ok(!memcmp(props.pMediaType, &expect_mt, sizeof(AM_MEDIA_TYPE)), "Media types didn't match.\n");
hr = IMediaSample_SetMediaType(sample, NULL);