From: Gwenole Beauchesne Date: Fri, 23 Jul 2010 11:28:29 +0000 (+0200) Subject: Fix va_TraceEndPicture() to unlock the VA surface. X-Git-Tag: libva-1.0.4~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6dc2d5c59b8578da7d9dc9c7818f94eabfd13800;p=profile%2Fivi%2Flibva.git Fix va_TraceEndPicture() to unlock the VA surface. --- diff --git a/va/va_trace.c b/va/va_trace.c index 4589a48..17dc2f8 100644 --- a/va/va_trace.c +++ b/va/va_trace.c @@ -1086,8 +1086,10 @@ void va_TraceEndPicture( va_TraceMsg("\tchroma_u_offset=%d\n", chroma_u_offset); va_TraceMsg("\tchroma_v_offset=%d\n", chroma_v_offset); - if (!buffer) + if (!buffer) { + vaUnlockSurface(dpy, trace_rendertarget); return; + } Y_data = buffer; UV_data = buffer + luma_offset; @@ -1120,4 +1122,6 @@ void va_TraceEndPicture( tmp = UV_data + i * chroma_u_stride; } } + + vaUnlockSurface(dpy, trace_rendertarget); }