# HG changeset patch # User jonas # Date 1158702163 0 # Node ID b6aa47caeb72708210431f105e59c5914341311e # Parent 60ef51a1a356b3886cf086d7c2a38949e68cea50 §Ænitial button value is -1. Only (button>0) is a correct button selection. Initialized "dvdnav_status_t status" explicitly for clarity. diff -r 60ef51a1a356 -r b6aa47caeb72 mplayer.c --- a/mplayer.c Tue Sep 19 21:18:54 2006 +0000 +++ b/mplayer.c Tue Sep 19 21:42:43 2006 +0000 @@ -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 diff -r 60ef51a1a356 -r b6aa47caeb72 stream/stream_dvdnav.c --- a/stream/stream_dvdnav.c Tue Sep 19 21:18:54 2006 +0000 +++ b/stream/stream_dvdnav.c Tue Sep 19 21:42:43 2006 +0000 @@ -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;