# HG changeset patch # User nicodvb # Date 1208599667 0 # Node ID 0dc09442ff9c073ac6da3359c0e6ee46b9a98faa # Parent f08dbb15ece14cdb5537b14f431ecc68c6ca4982 added missing mutex around the code in dvdnav_clear() ; patch by Erik Hovland - erik hovland org diff -r f08dbb15ece1 -r 0dc09442ff9c dvdnav.c --- a/dvdnav.c Sat Apr 19 09:44:15 2008 +0000 +++ b/dvdnav.c Sat Apr 19 10:07:47 2008 +0000 @@ -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 @@ this->cur_cell_time = 0; dvdnav_read_cache_clear(this->cache); + pthread_mutex_unlock(&this->vm_lock); return DVDNAV_STATUS_OK; }