[MPlayer-cvslog] r19914 - in trunk: mplayer.c stream/stream_dvdnav.c

jonas subversion at mplayerhq.hu
Tue Sep 19 23:42:43 CEST 2006


Author: jonas
Date: Tue Sep 19 23:42:43 2006
New Revision: 19914

Modified:
   trunk/mplayer.c
   trunk/stream/stream_dvdnav.c

Log:
Іnitial button value is -1. Only (button>0) is a correct button selection.
Initialized "dvdnav_status_t status" explicitly for clarity.



Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	(original)
+++ trunk/mplayer.c	Tue Sep 19 23:42:43 2006
@@ -5152,7 +5152,7 @@
         break;
     } break;
     case MP_CMD_SET_MOUSE_POS: {
-        int button = 0, pointer_x, pointer_y;
+        int button = -1, pointer_x, pointer_y;
         double dx, dy;
         pointer_x = cmd->args[0].v.i;
         pointer_y = cmd->args[1].v.i;
@@ -5168,13 +5168,13 @@
     }
 #ifdef USE_DVDNAV
     case MP_CMD_DVDNAV: {
-      int button = 0;
+      int button = -1;
       if(stream->type != STREAMTYPE_DVDNAV) break;
 
       if(mp_dvdnav_handle_input(stream, cmd->args[0].v.i, &button)) {
           uninit_player(INITED_ALL-(INITED_STREAM|INITED_INPUT|(fixed_vo ? INITED_VO : 0)));
           goto goto_enable_cache;
-      } else if(button) set_osd_msg(OSD_MSG_TEXT, 1, osd_duration, "Selected button number %d", button);
+      } else if(button>0) set_osd_msg(OSD_MSG_TEXT, 1, osd_duration, "Selected button number %d", button);
       break;
     }
 #endif

Modified: trunk/stream/stream_dvdnav.c
==============================================================================
--- trunk/stream/stream_dvdnav.c	(original)
+++ trunk/stream/stream_dvdnav.c	Tue Sep 19 23:42:43 2006
@@ -436,7 +436,7 @@
 int mp_dvdnav_handle_input(stream_t *stream, int cmd, int *button) {
   dvdnav_priv_t * dvdnav_priv=(dvdnav_priv_t*)stream->priv;
   dvdnav_t *nav = dvdnav_priv->dvdnav;
-  dvdnav_status_t status;
+  dvdnav_status_t status=DVDNAV_STATUS_ERR;
   pci_t *pci = dvdnav_get_current_nav_pci(nav);
   int reset = 0;
 



More information about the MPlayer-cvslog mailing list