comparison navigation.c @ 434:264c5b900bfb src

Pass return value of vm_jump_up back to the caller. dvdnav_go_up ignores the return value of vm_jump_up, and always returns DVDNAV_STATUS_OK, the calling code cannot therefore determine whether the jump was successful or not. The attached patch evaluates the return value from vm_jump_up and passes this back to the caller. Patch by Richard Hulme.
author rathann
date Sun, 06 Oct 2013 21:56:26 +0000
parents 9b8bfc56a7fe
children
comparison
equal deleted inserted replaced
433:1c7c804e9c82 434:264c5b900bfb
266 return DVDNAV_STATUS_OK; 266 return DVDNAV_STATUS_OK;
267 } 267 }
268 268
269 dvdnav_status_t dvdnav_go_up(dvdnav_t *this) { 269 dvdnav_status_t dvdnav_go_up(dvdnav_t *this) {
270 /* A nice easy function... delegate to the VM */ 270 /* A nice easy function... delegate to the VM */
271 pthread_mutex_lock(&this->vm_lock); 271 int32_t retval;
272 vm_jump_up(this->vm); 272
273 pthread_mutex_unlock(&this->vm_lock); 273 pthread_mutex_lock(&this->vm_lock);
274 274 retval = vm_jump_up(this->vm);
275 return DVDNAV_STATUS_OK; 275 pthread_mutex_unlock(&this->vm_lock);
276 } 276
277 return retval ? DVDNAV_STATUS_OK : DVDNAV_STATUS_ERR;
278 }