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

mfplat/allocator: Keep a reference to initialization attributes.

parent 467a96e9
......@@ -75,6 +75,8 @@ struct sample_allocator
unsigned int buffer_count;
} frame_desc;
IMFAttributes *attributes;
unsigned int free_sample_count;
unsigned int cold_sample_count;
struct list free_samples;
......@@ -1129,6 +1131,8 @@ static ULONG WINAPI sample_allocator_Release(IMFVideoSampleAllocatorEx *iface)
IDirect3DDeviceManager9_Release(allocator->d3d9_device_manager);
if (allocator->dxgi_device_manager)
IMFDXGIDeviceManager_Release(allocator->dxgi_device_manager);
if (allocator->attributes)
IMFAttributes_Release(allocator->attributes);
sample_allocator_release_samples(allocator);
DeleteCriticalSection(&allocator->cs);
heap_free(allocator);
......@@ -1348,7 +1352,10 @@ static HRESULT sample_allocator_initialize(struct sample_allocator *allocator, u
max_sample_count = max(1, max_sample_count);
if (attributes)
FIXME("Initialization attributes ignored.\n");
{
allocator->attributes = attributes;
IMFAttributes_AddRef(allocator->attributes);
}
allocator->frame_desc.d3d9_format = subtype.Data1;
allocator->frame_desc.dxgi_format = MFMapDX9FormatToDXGIFormat(allocator->frame_desc.d3d9_format);
......
......@@ -6442,7 +6442,6 @@ todo_wine
EXPECT_REF(attributes, 1);
hr = IMFVideoSampleAllocatorEx_InitializeSampleAllocatorEx(allocatorex, 0, 0, attributes, video_type);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
todo_wine
EXPECT_REF(attributes, 2);
count = 0;
......
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