2 Apr
2025
2 Apr
'25
9:13 a.m.
Anton Baskanov (@baskanov) commented about dlls/amstream/ddrawstream.c:
DWORD flags) { struct ddraw_stream *stream = impl_from_IMemAllocator(iface); + HRESULT hr;
- return IMemAllocator_GetBuffer(stream->private_allocator, buf, start_time, end_time, flags); + EnterCriticalSection(&stream->cs); + + *buf = stream->next_sample; + IMediaSample_SetTime(*buf, start_time, end_time); + hr = IMemAllocator_GetBuffer(stream->private_allocator, &stream->next_sample, NULL, NULL, flags);
We can get stuck here if there only one sample available. I think it's better to just store the media type and set it when `GetBuffer()` is called. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7715#note_99685