Commit e2259248 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

dvdnav_get_position: Fix mutex unlocking in case of error

parent 2d73a2b3
......@@ -563,11 +563,11 @@ dvdnav_status_t dvdnav_get_position(dvdnav_t *this, uint32_t *pos,
*len += cell->last_sector - cell->first_sector + 1;
}
pthread_mutex_unlock(&this->vm_lock);
if((signed)*pos == -1)
return DVDNAV_STATUS_ERR;
pthread_mutex_unlock(&this->vm_lock);
return DVDNAV_STATUS_OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment