[DVDnav-discuss] r1272 - trunk/libdvdnav/src/navigation.c

rathann subversion at mplayerhq.hu
Sun Oct 6 23:56:26 CEST 2013


Author: rathann
Date: Sun Oct  6 23:56:26 2013
New Revision: 1272

Log:
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.

Modified:
   trunk/libdvdnav/src/navigation.c

Modified: trunk/libdvdnav/src/navigation.c
==============================================================================
--- trunk/libdvdnav/src/navigation.c	Sun Oct  6 23:39:42 2013	(r1271)
+++ trunk/libdvdnav/src/navigation.c	Sun Oct  6 23:56:26 2013	(r1272)
@@ -268,9 +268,11 @@ dvdnav_status_t dvdnav_stop(dvdnav_t *th
 
 dvdnav_status_t dvdnav_go_up(dvdnav_t *this) {
   /* A nice easy function... delegate to the VM */
+  int32_t retval;
+
   pthread_mutex_lock(&this->vm_lock);
-  vm_jump_up(this->vm);
+  retval = vm_jump_up(this->vm);
   pthread_mutex_unlock(&this->vm_lock);
 
-  return DVDNAV_STATUS_OK;
+  return retval ? DVDNAV_STATUS_OK : DVDNAV_STATUS_ERR;
 }


More information about the DVDnav-discuss mailing list