# HG changeset patch # User erik # Date 1280532851 0 # Node ID 51be513f1a1df4e07cd97dd74e46a123570665f6 # Parent 1be2ffbeeb238d54edb79b1729662ac98988e14f Prevent deadlock in dvdnav_reset dvdnav_reset takes a lock and then calls dvdnav_clear (which also takes the same lock). This causes a deadlock. If the lock is released before dvdnav_clear is called, all is well. Derived from a patch submitted by John Stebbins. Thanks! diff -r 1be2ffbeeb23 -r 51be513f1a1d dvdnav.c --- a/dvdnav.c Fri Jul 30 23:34:08 2010 +0000 +++ b/dvdnav.c Fri Jul 30 23:34:11 2010 +0000 @@ -178,9 +178,9 @@ #ifdef LOG_DEBUG fprintf(MSG_OUT, "libdvdnav: clearing dvdnav\n"); #endif + pthread_mutex_unlock(&this->vm_lock); result = dvdnav_clear(this); - pthread_mutex_unlock(&this->vm_lock); return result; }