[MPlayer-dev-eng] [patch] dvdnav check during event processing

Kees Cook mplayer at outflux.net
Mon Apr 8 17:49:56 CEST 2002


On Sun, Apr 07, 2002 at 09:41:55AM -0700, Kees Cook wrote:
> If you had compiled --with-libdvdnav, but were not playing -dvdnav, any 
> dvdnav key events would crash mplayer.  This patch fixes it.
> 
> -- 
> Kees Cook                                            @outflux.net

> diff -ur MPlayer-20020406-clean/mplayer.c MPlayer-20020406-bug/mplayer.c
> --- MPlayer-20020406-clean/mplayer.c	Thu Apr  4 06:44:47 2002
> +++ MPlayer-20020406-bug/mplayer.c	Sun Apr  7 09:37:32 2002
> @@ -2485,6 +2485,9 @@
>        dvdnav_priv_t * dvdnav_priv = (dvdnav_priv_t*)(stream->priv);
>        dvdnav_event_t * dvdnav_event = (dvdnav_event_t *)(cmd->args[0].v.v);
>  
> +      /* ignore these events if we're not in dvd_nav mode */
> +      if (!dvd_nav) break;
> +
>        if (!dvdnav_event) {
>          printf("DVDNAV Event NULL?!\n");
>          break;
> @@ -2638,6 +2641,9 @@
>      case MP_CMD_DVDNAV: {
>        dvdnav_priv_t * dvdnav_priv=(dvdnav_priv_t*)stream->priv;
>  
> +      /* ignore these events if we're not in dvd_nav mode */
> +      if (!dvd_nav) break;
> +
>        switch (cmd->args[0].v.i) {
>          case MP_CMD_DVDNAV_UP:
>            dvdnav_upper_button_select(dvdnav_priv->dvdnav);

Hi again!  Please don't forget this patch, it's a crash-fix...

-- 
Kees Cook                                            @outflux.net



More information about the MPlayer-dev-eng mailing list