Commit f91cadcd authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mfplat: Set sample flags.

parent f9bb5f4a
......@@ -475,9 +475,15 @@ static HRESULT WINAPI sample_GetSampleFlags(IMFSample *iface, DWORD *flags)
static HRESULT WINAPI sample_SetSampleFlags(IMFSample *iface, DWORD flags)
{
FIXME("%p, %#x.\n", iface, flags);
struct sample *sample = impl_from_IMFSample(iface);
return E_NOTIMPL;
TRACE("%p, %#x.\n", iface, flags);
EnterCriticalSection(&sample->cs);
sample->flags = flags;
LeaveCriticalSection(&sample->cs);
return S_OK;
}
static HRESULT WINAPI sample_GetSampleTime(IMFSample *iface, LONGLONG *sampletime)
......
......@@ -734,6 +734,12 @@ static void test_sample(void)
ok(hr == S_OK, "Failed to get sample flags, hr %#x.\n", hr);
ok(!flags, "Unexpected flags %#x.\n", flags);
hr = IMFSample_SetSampleFlags(sample, 0x123);
ok(hr == S_OK, "Failed to set sample flags, hr %#x.\n", hr);
hr = IMFSample_GetSampleFlags(sample, &flags);
ok(hr == S_OK, "Failed to get sample flags, hr %#x.\n", hr);
ok(flags == 0x123, "Unexpected flags %#x.\n", flags);
hr = IMFSample_GetSampleTime(sample, &time);
todo_wine
ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#x.\n", 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