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

nicodvb subversion at mplayerhq.hu
Sat Apr 19 12:07:47 CEST 2008


Author: nicodvb
Date: Sat Apr 19 12:07:47 2008
New Revision: 1009

Log:
added missing mutex around the code in dvdnav_clear() ; patch by Erik Hovland  - 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	Sat Apr 19 12:07:47 2008
@@ -53,6 +53,7 @@
 static dvdnav_status_t dvdnav_clear(dvdnav_t * this) {
   /* clear everything except file, vm, mutex, readahead */
 
+  pthread_mutex_lock(&this->vm_lock);
   if (this->file) DVDCloseFile(this->file);
   this->file = NULL;
 
@@ -70,6 +71,7 @@ static dvdnav_status_t dvdnav_clear(dvdn
   this->cur_cell_time = 0;
 
   dvdnav_read_cache_clear(this->cache);
+  pthread_mutex_unlock(&this->vm_lock);
   
   return DVDNAV_STATUS_OK;
 }



More information about the DVDnav-discuss mailing list