From: David Gow <david(a)ingeniumdigital.com> Add support for NV12 to evr_render(), as otherwise no video is rendered at all in games like Age of Empires II DE. Interestingly, this doesn't result in NV12 data being passed to evr_copy_sample_buffer() as I suspected, so the RGB32 copying code seems to work fine. Nevertheless, add a warning if we get an unknown format in evr_copy_sample_buffer(), as that could potentially lead to nasty memory issues. Signed-off-by: David Gow <david(a)ingeniumdigital.com> --- dlls/evr/evr.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/evr/evr.c b/dlls/evr/evr.c index 516427c5fff..53085f32ef0 100644 --- a/dlls/evr/evr.c +++ b/dlls/evr/evr.c @@ -368,10 +368,15 @@ static HRESULT evr_copy_sample_buffer(struct evr *filter, const GUID *subtype, I { width = (3 * width + 3) & ~3; } - else + else if (IsEqualGUID(subtype, &MFVideoFormat_ARGB32) + || IsEqualGUID(subtype, &MFVideoFormat_RGB32)) { width *= 4; } + else + { + FIXME("unsupported video format %s\n", debugstr_guid(subtype)); + } if (FAILED(hr = IMediaSample_GetPointer(input_sample, &src))) { @@ -427,7 +432,8 @@ static HRESULT evr_render(struct strmbase_renderer *iface, IMediaSample *input_s if (IsEqualGUID(&subtype, &MFVideoFormat_ARGB32) || IsEqualGUID(&subtype, &MFVideoFormat_RGB32) - || IsEqualGUID(&subtype, &MFVideoFormat_YUY2)) + || IsEqualGUID(&subtype, &MFVideoFormat_YUY2) + || IsEqualGUID(&subtype, &MFVideoFormat_NV12)) { if (SUCCEEDED(hr = evr_copy_sample_buffer(filter, &subtype, input_sample, &sample))) { -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5157