From: Leo Liu Date: Sun, 1 Oct 2017 02:19:49 +0000 (-0400) Subject: st/vdpau: don't re-allocate interlaced buffer with packed YUV format X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=327480d10f2dab52de28e9a84609fac81c2034c5;p=mesa.git st/vdpau: don't re-allocate interlaced buffer with packed YUV format It caused corruption, when vlVdpVideoSurfacePutBitsYCbCr putting YUV to the fields Cc: mesa-stable@lists.freedesktop.org Cc: Andy Furniss Tested-by: Andy Furniss Reviewed-by: Christian König --- diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c index 884ae308319..c678eb70377 100644 --- a/src/gallium/state_trackers/vdpau/surface.c +++ b/src/gallium/state_trackers/vdpau/surface.c @@ -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);