frontends/vdpau: Default destination rect to source rect

mpv is passing in a NULL destination_video_rect, which results in a
black screen when playing videos using VDPAU in some cases.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5386>
This commit is contained in:
Thong Thai 2020-06-08 10:29:01 -04:00 committed by Marge Bot
parent 0795241dde
commit b2324f4560

View file

@ -331,6 +331,9 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer,
} }
} }
if (!destination_video_rect)
destination_video_rect = video_source_rect;
prect = RectToPipe(video_source_rect, &rect); prect = RectToPipe(video_source_rect, &rect);
if (!prect) { if (!prect) {
rect.x0 = 0; rect.x0 = 0;