From: Austin Yuan Date: Thu, 27 Feb 2014 07:36:17 +0000 (+0800) Subject: vafool: fix the vaMapBuffer for the buffer from vaDeriveImage X-Git-Tag: 1.4.0.pre1~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d4faa102b49ef6dbf8a1fcd04a82a8c04030e6a;p=platform%2Fupstream%2Flibva.git vafool: fix the vaMapBuffer for the buffer from vaDeriveImage It is not desired to run into FOOL path for the vaMapBuffer from vaDeriveImage Signed-off-by: Austin Yuan (cherry picked from commit 2896166fefa36772ea6946ebc5df85024928dd6c) --- diff --git a/va/va_fool.c b/va/va_fool.c index 95d1880..9f7a045 100644 --- a/va/va_fool.c +++ b/va/va_fool.c @@ -252,8 +252,14 @@ VAStatus va_FoolBufferInfo( unsigned int *num_elements /* out */ ) { + unsigned int magic; + DPY2FOOLCTX_CHK(dpy); + magic = buf_id & FOOL_BUFID_MASK; + if (magic != FOOL_BUFID_MAGIC) + return 0; /* could be VAImageBufferType from vaDeriveImage */ + *type = buf_id & 0xff; *size = fool_ctx->fool_buf_size[*type]; *num_elements = fool_ctx->fool_buf_element[*type];; @@ -342,9 +348,13 @@ VAStatus va_FoolMapBuffer( void **pbuf /* out */ ) { - unsigned int buftype; + unsigned int magic, buftype; DPY2FOOLCTX_CHK(dpy); + magic = buf_id & FOOL_BUFID_MASK; + if (magic != FOOL_BUFID_MAGIC) + return 0; /* could be VAImageBufferType from vaDeriveImage */ + buftype = buf_id & 0xff; *pbuf = fool_ctx->fool_buf[buftype]; diff --git a/va/va_trace.c b/va/va_trace.c index c2479cd..5df619a 100644 --- a/va/va_trace.c +++ b/va/va_trace.c @@ -2938,7 +2938,7 @@ void va_TraceRenderPicture( case VAProfileNone: for (j=0; j