Mercurial > libdvdnav.hg
comparison dvdnav.c @ 365:b19a644148a9 src
in dvdnav_close() protect the actual call do DVDCloseFile() with a mutex; patch by Erik Hovland org
author | nicodvb |
---|---|
date | Thu, 22 May 2008 20:29:08 +0000 |
parents | d0bfcfa565b0 |
children | 2e9382be8e25 |
comparison
equal
deleted
inserted
replaced
364:23607807ff65 | 365:b19a644148a9 |
---|---|
135 #ifdef LOG_DEBUG | 135 #ifdef LOG_DEBUG |
136 fprintf(MSG_OUT, "libdvdnav: close:called\n"); | 136 fprintf(MSG_OUT, "libdvdnav: close:called\n"); |
137 #endif | 137 #endif |
138 | 138 |
139 if (this->file) { | 139 if (this->file) { |
140 pthread_mutex_lock(&this->vm_lock); | |
140 DVDCloseFile(this->file); | 141 DVDCloseFile(this->file); |
141 #ifdef LOG_DEBUG | 142 #ifdef LOG_DEBUG |
142 fprintf(MSG_OUT, "libdvdnav: close:file closing\n"); | 143 fprintf(MSG_OUT, "libdvdnav: close:file closing\n"); |
143 #endif | 144 #endif |
144 this->file = NULL; | 145 this->file = NULL; |
146 pthread_mutex_unlock(&this->vm_lock); | |
145 } | 147 } |
146 | 148 |
147 /* Free the VM */ | 149 /* Free the VM */ |
148 if(this->vm) | 150 if(this->vm) |
149 vm_free_vm(this->vm); | 151 vm_free_vm(this->vm); |