*
**************************************************************************/
-#include <util/u_handle_table.h>
-#include <os/os_thread.h>
+#include "util/u_handle_table.h"
+#include "os/os_thread.h"
#include "vdpau_private.h"
#ifdef VL_HANDLES
{
#ifdef VL_HANDLES
pipe_mutex_lock(htab_lock);
- if (htab) {
+ if (htab && !handle_table_get_first_handle(htab)) {
handle_table_destroy(htab);
htab = NULL;
}
return (void*)handle;
#endif
}
+
+void vlRemoveDataHTAB(vlHandle handle)
+{
+#ifdef VL_HANDLES
+ pipe_mutex_lock(htab_lock);
+ if (htab)
+ handle_table_remove(htab, handle);
+ pipe_mutex_unlock(htab_lock);
+#endif
+}