[vlc-devel] commit: libvlc: Fix a typo in vlc_gc_object vlc_release(). We need to desstroy when the refcount reaches zero. (Pierre d'Herbemont )
git version control
git at videolan.org
Sat Sep 20 01:08:40 CEST 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sat Sep 20 01:08:38 2008 +0200| [a42998e5478948372da51a0d77e7d2332b61d8c8] | committer: Pierre d'Herbemont
libvlc: Fix a typo in vlc_gc_object vlc_release(). We need to desstroy when the refcount reaches zero.
(Why do we use uint? We can't track over-releasing?)
(Or we need to init it at 2).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a42998e5478948372da51a0d77e7d2332b61d8c8
---
src/libvlc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libvlc.c b/src/libvlc.c
index 07e25d3..b6d1e12 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -185,8 +185,8 @@ void vlc_release (gc_object_t *p_gc)
vlc_spin_unlock (&p_gc->spin);
#endif
- assert (refs > 0);
- if (refs == 1)
+ /* assert(refs >= 0); */
+ if (refs == 0)
{
vlc_spin_destroy (&p_gc->spin);
p_gc->pf_destructor (p_gc);
More information about the vlc-devel
mailing list