st/vdpau: release held lock in error path
authorGrazvydas Ignotas <notasas@gmail.com>
Mon, 15 Jan 2018 22:00:33 +0000 (00:00 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 19 Jan 2018 11:30:22 +0000 (13:30 +0200)
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: mesa-stable@lists.freedesktop.org
src/gallium/state_trackers/vdpau/surface.c

index c678eb70377a5d70ffdb90a7df1d4c7a4fc4c293..012d303641160a19f4615d76242529a86fb0886a 100644 (file)
@@ -369,8 +369,10 @@ vlVdpVideoSurfacePutBitsYCbCr(VdpVideoSurface surface,
       if (pformat == PIPE_FORMAT_YV12 &&
           p_surf->video_buffer->buffer_format == PIPE_FORMAT_NV12)
          conversion = CONVERSION_YV12_TO_NV12;
-      else
+      else {
+         mtx_unlock(&p_surf->device->mutex);
          return VDP_STATUS_NO_IMPLEMENTATION;
+      }
    }
 
    sampler_views = p_surf->video_buffer->get_sampler_view_planes(p_surf->video_buffer);