hardware/intel/libva
Revisión | 2e90a47d9ec2c28907d5530fccb1de04bf715c14 (tree) |
---|---|
Tiempo | 2014-09-09 02:17:44 |
Autor | Austin Yuan <shengquan.yuan@inte...> |
Commiter | Xiang, Haihao |
vatrace: fix segfault of VASurfaceAttribExternalBufferDescriptor dumpping
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
(cherry picked from commit e286c3264ebf7582792ff56537dd14c9f49903cf)
@@ -481,7 +481,7 @@ static void va_TraceSurfaceAttributes( | ||
481 | 481 | break; |
482 | 482 | case VAGenericValueTypePointer: |
483 | 483 | va_TraceMsg(trace_ctx, "\t\tvalue.value.p = %p\n", p->value.value.p); |
484 | - if (type == VASurfaceAttribExternalBufferDescriptor) { | |
484 | + if ((p->type == VASurfaceAttribExternalBufferDescriptor) && p->value.value.p) { | |
485 | 485 | VASurfaceAttribExternalBuffers *tmp = (VASurfaceAttribExternalBuffers *) p->value.value.p; |
486 | 486 | int j; |
487 | 487 |
@@ -499,7 +499,7 @@ static void va_TraceSurfaceAttributes( | ||
499 | 499 | va_TraceMsg(trace_ctx, "\t\t num_buffers=0x%08x\n", tmp->num_buffers); |
500 | 500 | va_TraceMsg(trace_ctx, "\t\t buffers=%p\n", tmp->buffers); |
501 | 501 | for (j = 0; j < tmp->num_buffers; j++) { |
502 | - va_TraceMsg(trace_ctx, "\t\t\tbuffers[%j]=%p\n", tmp->buffers[j]); | |
502 | + va_TraceMsg(trace_ctx, "\t\t\tbuffers[%d]=%p\n", j, tmp->buffers[j]); | |
503 | 503 | } |
504 | 504 | } |
505 | 505 | break; |