Skip to content
Snippets Groups Projects
Commit aebb6314 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont Committed by Hugo Beauzée-Luyssen
Browse files

vdpau: remove the instance reference count

This was necessary for sharing and for vlc_hold_x11(), but they were
both removed.

Note that the list is still used to match a display to an instance, so
it cannot be removed quite yet.
parent 98632a96
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,6 @@ typedef struct vdp_instance
vdp_t *vdp;
VdpDevice device;
uintptr_t refs; /**< Reference count */
struct vdp_instance *next;
} vdp_instance_t;
......@@ -68,7 +67,6 @@ static vdp_instance_t *vdp_instance_create(const char *name, int num)
}
vi->next = NULL;
vi->refs = 1;
return vi;
}
......@@ -120,12 +118,7 @@ void vdp_release_x11(vdp_t *vdp)
pp = &vi->next;
}
assert(vi->refs > 0);
vi->refs--;
if (vi->refs > 0)
vi = NULL; /* Keep the instance for now */
else
*pp = vi->next; /* Unlink the instance */
*pp = vi->next; /* Unlink the instance */
pthread_mutex_unlock(&lock);
if (vi != NULL)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment