changeset 407:51be513f1a1d src

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!
author erik
date Fri, 30 Jul 2010 23:34:11 +0000
parents 1be2ffbeeb23
children 7923e813ec61
files dvdnav.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;
 }