From: Brendan McGrath <bmcgrath@codeweavers.com> --- dlls/quartz/colorconv.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dlls/quartz/colorconv.c b/dlls/quartz/colorconv.c index 286e446e938..1a91400fa23 100644 --- a/dlls/quartz/colorconv.c +++ b/dlls/quartz/colorconv.c @@ -128,7 +128,10 @@ static const struct strmbase_sink_ops sink_ops = static HRESULT WINAPI color_source_DecideBufferSize( struct strmbase_source *iface, IMemAllocator *alloc, ALLOCATOR_PROPERTIES *props) { + const struct subtype *subtype; ALLOCATOR_PROPERTIES actual; + BITMAPINFOHEADER *header; + long min_image_size; if (!props->cbAlign) props->cbAlign = 1; @@ -136,6 +139,14 @@ static HRESULT WINAPI color_source_DecideBufferSize( if (!props->cBuffers) props->cBuffers = 1; + subtype = get_subtype(&iface->pin.mt); + + header = &((VIDEOINFOHEADER *)iface->pin.mt.pbFormat)->bmiHeader; + min_image_size = header->biWidth * header->biHeight * (subtype->bitcount / 8); + + if (props->cbBuffer < min_image_size) + props->cbBuffer = min_image_size; + return IMemAllocator_SetProperties(alloc, props, &actual); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11679