summaryrefslogtreecommitdiffstats
path: root/contrib/libdvdnav/A06-reset-mutex.patch
blob: 76f55e34810d914c5eed234ef326561b5abf0632 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Index: src/dvdnav.c
===================================================================
--- libdvdnav.orig/src/dvdnav.c	(revision 1168)
+++ libdvdnav/src/dvdnav.c	(working copy)
@@ -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;
 }
 
@@ -519,7 +519,8 @@
   }
 
   /* Check to see if we need to change the currently opened VOB */
-  if((this->position_current.vts != this->position_next.vts) ||
+  if((this->file == NULL) ||
+     (this->position_current.vts != this->position_next.vts) ||
      (this->position_current.domain != this->position_next.domain)) {
     dvd_read_domain_t domain;
     int32_t vtsN;