diff searching.c @ 166:3bfaec0c1288 src

* fix warnings with gcc 3.3 * some menu sanity checking in highlight.c (the button functions should do nothing, when called outside a menu) * escape should take us to the Root menu, not the Title menu, since this is what the standard "Menu" button on a DVD player does
author mroi
date Mon, 21 Apr 2003 13:18:06 +0000
parents 5d8955d7a01a
children e9987c07e255
line wrap: on
line diff
--- a/searching.c	Tue Apr 08 13:51:55 2003 +0000
+++ b/searching.c	Mon Apr 21 13:18:06 2003 +0000
@@ -44,7 +44,7 @@
 /* Return placed in vobu. */
 /* Returns error status */
 /* FIXME: Maybe need to handle seeking outside current cell. */
-static dvdnav_status_t dvdnav_scan_admap(dvdnav_t *this, int32_t domain, int32_t seekto_block, int32_t *vobu) {
+static dvdnav_status_t dvdnav_scan_admap(dvdnav_t *this, int domain, uint32_t seekto_block, uint32_t *vobu) {
   vobu_admap_t *admap = NULL;
 
 #ifdef LOG_DEBUG
@@ -69,8 +69,8 @@
     fprintf(MSG_OUT, "libdvdnav: Error: Unknown domain for seeking.\n");
   }
   if(admap) {
-    int32_t address = 0;
-    int32_t vobu_start, next_vobu;
+    uint32_t address = 0;
+    uint32_t vobu_start, next_vobu;
     int found = 0;
 
     /* Search through ADMAP for best sector */
@@ -369,7 +369,7 @@
         return S_OK;
     }
   }
-  if (menu == DVD_MENU_Escape) menu = DVD_MENU_Title;
+  if (menu == DVD_MENU_Escape) menu = DVD_MENU_Root;
  
   if (vm_jump_menu(try_vm, menu) && !try_vm->stopped) {
     /* merge changes on success */
@@ -390,9 +390,7 @@
 dvdnav_status_t dvdnav_get_position(dvdnav_t *this, unsigned int *pos,
 				    unsigned int *len) {
   uint32_t cur_sector;
-  uint32_t cell_nr;
-  uint32_t first_cell_nr;
-  uint32_t last_cell_nr;
+  int cell_nr, first_cell_nr, last_cell_nr;
   cell_playback_t *cell;
   dvd_state_t *state;
 
@@ -441,7 +439,7 @@
     *len += cell->last_sector - cell->first_sector + 1;
   }
   
-  assert(*pos != -1);
+  assert((signed)*pos != -1);
 
   pthread_mutex_unlock(&this->vm_lock);