[vlc-devel] [PATCH] vdpau: fix video scaling

Rinat Ibragimov ibragimovrinat at mail.ru
Mon Jun 13 18:53:02 CEST 2016

There is a possible issue in VdpVideoMixerRender [1] call. While
destination_rect is set to dst_rect, which is fine, destination_video_rect
parameter is set to NULL, which makes video keep the size, while it's
expected to fill the entire output rectangle.

Proposed patch sets destination_video_rect to dst_rect, which makes
video scale when player window is resized.

[1] http://http.download.nvidia.com/XFree86/vdpau/doxygen/html/group___vdp_video_mixer.html#ga62bf3bf8c5f01322a03b07065c5ea3db

 modules/hw/vdpau/chroma.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/hw/vdpau/chroma.c b/modules/hw/vdpau/chroma.c
index a42aed2..d13515f 100644
--- a/modules/hw/vdpau/chroma.c
+++ b/modules/hw/vdpau/chroma.c
@@ -652,7 +652,8 @@ static picture_t *Render(filter_t *filter, picture_t *src, bool import)
     err = vdp_video_mixer_render(sys->vdp, sys->mixer, VDP_INVALID_HANDLE,
                                  NULL, structure,
                                  MAX_PAST, past, surface, MAX_FUTURE, future,
-                                 &src_rect, output, &dst_rect, NULL, 0, NULL);
+                                 &src_rect, output, &dst_rect, &dst_rect, 0,
+                                 NULL);
     if (err != VDP_STATUS_OK)
         msg_Err(filter, "video %s %s failure: %s", "mixer", "rendering",

More information about the vlc-devel mailing list