st/va: added some calls to handle_table_remove()
authorMichael Varga <Michael.Varga@amd.com>
Mon, 27 Oct 2014 15:43:20 +0000 (10:43 -0500)
committerLeo Liu <leo.liu@amd.com>
Wed, 19 Nov 2014 14:29:10 +0000 (09:29 -0500)
In a few locations handles were being added but not removed.

Signed-off-by: Michael Varga <Michael.Varga@amd.com>
src/gallium/state_trackers/va/buffer.c
src/gallium/state_trackers/va/context.c
src/gallium/state_trackers/va/image.c

index 4023c3276294218b2933315d23efe5b457d7cfb3..8f9ba440a75608af3cfc0766f9b10bd71821ce5a 100644 (file)
@@ -131,6 +131,7 @@ vlVaDestroyBuffer(VADriverContextP ctx, VABufferID buf_id)
 
    FREE(buf->data);
    FREE(buf);
+   handle_table_remove(VL_VA_DRIVER(ctx)->htab, buf_id);
 
    return VA_STATUS_SUCCESS;
 }
index ae87d3b2b153d6cc7e3ece26f4f628996758d94d..a7a55f961398ca5002d49c8a5c9de9649e66ee14 100644 (file)
@@ -212,6 +212,7 @@ vlVaDestroyContext(VADriverContextP ctx, VAContextID context_id)
    }
    context->decoder->destroy(context->decoder);
    FREE(context);
+   handle_table_remove(drv->htab, context_id);
 
    return VA_STATUS_SUCCESS;
 }
index cd4044a1a7620010875b0089b49cb4ee4725af38..a30155e26c973246394830e1f0af978de5679e29 100644 (file)
@@ -171,6 +171,7 @@ vlVaDestroyImage(VADriverContextP ctx, VAImageID image)
    if (!vaimage)
       return VA_STATUS_ERROR_INVALID_IMAGE;
 
+   handle_table_remove(VL_VA_DRIVER(ctx)->htab, image);
    return vlVaDestroyBuffer(ctx, vaimage->buf);
 }