OSDN Git Service

import original 0.9.5 release
[handbrake-jp/handbrake-jp.git] / contrib / libdvdnav / A06-reset-mutex.patch
diff --git a/contrib/libdvdnav/A06-reset-mutex.patch b/contrib/libdvdnav/A06-reset-mutex.patch
new file mode 100644 (file)
index 0000000..76f55e3
--- /dev/null
@@ -0,0 +1,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;