diff -Naur mplayer-export-2011-02-28.orig/libvo/vo_aa.c mplayer-export-2011-02-28/libvo/vo_aa.c --- mplayer-export-2011-02-28.orig/libvo/vo_aa.c 2010-11-14 11:12:34.000000000 +0200 +++ mplayer-export-2011-02-28/libvo/vo_aa.c 2011-03-01 12:16:20.000000000 +0200 @@ -23,7 +23,9 @@ #include #include +#include #include +#include #include #include @@ -666,7 +668,6 @@ char * hidis = NULL; struct stat sbuf; int fd, vt, major, minor; - FILE * fp; char fname[12]; if(arg) @@ -677,6 +678,9 @@ /* initializing of aalib */ + if (monitor_pixel_aspect == 1.0) { + monitor_pixel_aspect = 0.5; + } hidis=aa_getfirst(&aa_displayrecommended); if ( hidis==NULL ){ /* check /dev/vcsa */ @@ -686,15 +690,22 @@ major = sbuf.st_rdev >> 8; vt = minor = sbuf.st_rdev & 0xff; close (fd); - sprintf (fname, "/dev/vcsa%2.2i", vt); - fp = fopen (fname, "w+"); - if (fp==NULL){ + sprintf(fname, "/dev/vcsa%d", vt); + fd = open(fname, O_WRONLY); + if (fd == -1) { + sprintf(fname, "/dev/vcsa%2.2i", vt); + fd = open(fname, O_WRONLY); + } + if (fd == -1) { fprintf(stderr,"VO: [aa] cannot open %s for writing," "so we'll not use linux driver\n", fname); aa_recommendlowdisplay("linux"); + aa_recommendhidisplay("slang"); aa_recommendhidisplay("curses"); aa_recommendhidisplay("X11"); - }else fclose(fp); + } else { + close(fd); + } } else aa_recommendhidisplay(hidis); c = aa_autoinit(&aa_defparams);