29{
32
34 ok(
hr==
S_OK,
"Unable to create memory allocator %x\n",
hr);
35
37 {
40
42
47
48 hr = IMemAllocator_SetProperties(pMemAllocator, &RequestedProps, &ActualProps);
49 ok(
hr==
S_OK,
"SetProperties returned: %x\n",
hr);
50
51 hr = IMemAllocator_Commit(pMemAllocator);
53 hr = IMemAllocator_Commit(pMemAllocator);
55
56 hr = IMemAllocator_GetBuffer(pMemAllocator, &sample,
NULL,
NULL, 0);
57 ok(
hr==
S_OK,
"Could not get a buffer: %x\n",
hr);
58
59 hr = IMemAllocator_Decommit(pMemAllocator);
61 hr = IMemAllocator_Decommit(pMemAllocator);
63
64
65 if (sample)
66 {
67 hr = IMemAllocator_Commit(pMemAllocator);
69
70 hr = IMemAllocator_GetBuffer(pMemAllocator, &sample2,
NULL,
NULL, 0);
71 ok(
hr==
S_OK,
"Could not get a buffer: %x\n",
hr);
72 IMediaSample_Release(sample);
73 if (sample2)
74 IMediaSample_Release(sample2);
75
76 hr = IMemAllocator_Decommit(pMemAllocator);
78 }
79 IMemAllocator_Release(pMemAllocator);
80 }
81}
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)