[DVDnav-discuss] r1042 - trunk/libdvdnav/src/dvdnav.c

nicodvb subversion at mplayerhq.hu
Thu May 22 22:29:10 CEST 2008


Author: nicodvb
Date: Thu May 22 22:29:08 2008
New Revision: 1042

Log:
in dvdnav_close() protect the actual call do DVDCloseFile() with a mutex; patch by Erik Hovland org

Modified:
   trunk/libdvdnav/src/dvdnav.c

Modified: trunk/libdvdnav/src/dvdnav.c
==============================================================================
--- trunk/libdvdnav/src/dvdnav.c	(original)
+++ trunk/libdvdnav/src/dvdnav.c	Thu May 22 22:29:08 2008
@@ -137,11 +137,13 @@ dvdnav_status_t dvdnav_close(dvdnav_t *t
 #endif
 
   if (this->file) {
+    pthread_mutex_lock(&this->vm_lock); 
     DVDCloseFile(this->file);
 #ifdef LOG_DEBUG
     fprintf(MSG_OUT, "libdvdnav: close:file closing\n");
 #endif
     this->file = NULL;
+    pthread_mutex_unlock(&this->vm_lock); 
   }
 
   /* Free the VM */



More information about the DVDnav-discuss mailing list