Mercurial > mplayer.hg
changeset 9883:3a407acefec5
multiple init fix by Aurelien JACOBS <aurel@gnuage.org>
author | alex |
---|---|
date | Tue, 08 Apr 2003 18:05:41 +0000 |
parents | 454d8a4bd4f9 |
children | d7b86f7d1406 |
files | libvo/vo_vesa.c |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_vesa.c Tue Apr 08 17:36:33 2003 +0000 +++ b/libvo/vo_vesa.c Tue Apr 08 18:05:41 2003 +0000 @@ -115,8 +115,10 @@ /* Linux Video Overlay */ static const char *lvo_name = NULL; +static int lvo_opened = 0; #ifdef CONFIG_VIDIX static const char *vidix_name = NULL; +static int vidix_opened = 0; #endif #define HAS_DGA() (win.idx == -1) @@ -150,9 +152,9 @@ static void vesa_term( void ) { int err; - if(lvo_name) vlvo_term(); + if(lvo_opened) { vlvo_term(); lvo_opened = 0; } #ifdef CONFIG_VIDIX - else if(vidix_name) vidix_term(); + else if(vidix_opened) { vidix_term(); vidix_opened = 0; } #endif if(init_state) if((err=vbeRestoreState(init_state)) != VBE_OK) PRINT_VBE_ERR("vbeRestoreState",err); init_state=NULL; @@ -939,11 +941,11 @@ if(vlvo_init(width,height,x_offset,y_offset,dstW,dstH,format,dstBpp) != 0) { printf("vo_vesa: Can't initialize Linux Video Overlay\n"); - lvo_name = NULL; vesa_term(); return -1; } else printf("vo_vesa: Using video overlay: %s\n",lvo_name); + lvo_opened = 1; } #ifdef CONFIG_VIDIX else @@ -954,12 +956,12 @@ video_mode_info.XResolution,video_mode_info.YResolution) != 0) { printf("vo_vesa: Can't initialize VIDIX driver\n"); - vidix_name = NULL; vesa_term(); return -1; } else printf("vo_vesa: Using VIDIX\n"); vidix_start(); + vidix_opened = 1; } #endif }