[MPlayer-dev-eng] [PATCH] another -vo svga kbd echo fix

Arpi arpi at thot.banki.hu
Wed May 8 14:13:57 CEST 2002


Hi,

>  The problem, if I get it right, is that the following chain of events
>  takes place:
> 
>  1) getch2_enable() is invoked. It saves the terminal state and then
>  clears CANON and ECHO.
>  2) svgalib is initialized. It saves the terminal state, with CANON and
>  ECHO cleared, and marks it to be restored atexit().
>  3) getch2_disable() is invoked. It restores the terminal state saved
>  by getch2_enable().
>  4) at exit, the terminal state saved on svgalib init is restored,
>  including CANON and ECHO cleared.

it was true at time when ziv-av sent his patch - i've changed the uninit
order instead of applying his patch
see at uninit_player() in mplayer.c

>  Now this can probably be fixed by moving getch2_enable after vo_init,
>  but it is clearer (IMHO) not to have two propably conflicting terminal
>  state saves/restores, so I placed a getch2_disable() in vo_svga.c just
>  before vga_init(). This fixes the bug, and after svgalib init, the
>  terminal is in a state suitable for mplayer input (.c_cc[VMIN]=1 etc.)

yes this patch is better, but still messy
i'll apply it

but still wonder why uninit order is bad


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list