st/vdpau: don't re-allocate interlaced buffer with packed YUV format
authorLeo Liu <leo.liu@amd.com>
Sun, 1 Oct 2017 02:19:49 +0000 (22:19 -0400)
committerLeo Liu <leo.liu@amd.com>
Wed, 4 Oct 2017 13:22:33 +0000 (09:22 -0400)
It caused corruption, when vlVdpVideoSurfacePutBitsYCbCr putting YUV to the fields

Cc: mesa-stable@lists.freedesktop.org
Cc: Andy Furniss <adf.lists@gmail.com>
Tested-by: Andy Furniss <adf.lists@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/vdpau/surface.c

index 884ae308319de55f11a1501f9b0262bcb029e31b..c678eb70377a5d70ffdb90a7df1d4c7a4fc4c293 100644 (file)
@@ -350,6 +350,8 @@ vlVdpVideoSurfacePutBitsYCbCr(VdpVideoSurface surface,
 
          /* adjust the template parameters */
          p_surf->templat.buffer_format = nformat;
+         if (nformat == PIPE_FORMAT_YUYV || nformat == PIPE_FORMAT_UYVY)
+            p_surf->templat.interlaced = false;
 
          /* and try to create the video buffer with the new format */
          p_surf->video_buffer = pipe->create_video_buffer(pipe, &p_surf->templat);