mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 15:52:25 +00:00
osd problem with YV12 fixed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1576 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
c82d672838
commit
8692ac860f
@ -240,10 +240,13 @@ init(uint32_t width, uint32_t height, uint32_t d_width,
|
|||||||
|
|
||||||
/* initializing of aalib */
|
/* initializing of aalib */
|
||||||
|
|
||||||
hidis=aa_getfirst(&aa_displayrecommended);
|
/* why removes get after getting it the gotten value out of the list? :( */
|
||||||
if ( hidis==NULL || strcasecmp(hidis, "linux")){
|
//hidis=aa_getfirst(&aa_displayrecommended);
|
||||||
|
if (aa_displayrecommended!=NULL)
|
||||||
|
hidis=aa_displayrecommended->text;
|
||||||
|
if ( hidis==NULL ){
|
||||||
/* check /dev/vcsa<vt> */
|
/* check /dev/vcsa<vt> */
|
||||||
/* check only, if driver linux not explicit set */
|
/* check only, if no driver is explicit set */
|
||||||
fd = dup (fileno (stderr));
|
fd = dup (fileno (stderr));
|
||||||
fstat (fd, &sbuf);
|
fstat (fd, &sbuf);
|
||||||
major = sbuf.st_rdev >> 8;
|
major = sbuf.st_rdev >> 8;
|
||||||
@ -251,11 +254,9 @@ init(uint32_t width, uint32_t height, uint32_t d_width,
|
|||||||
close (fd);
|
close (fd);
|
||||||
sprintf (fname, "/dev/vcsa%i", vt);
|
sprintf (fname, "/dev/vcsa%i", vt);
|
||||||
fp = fopen (fname, "w+");
|
fp = fopen (fname, "w+");
|
||||||
fprintf(stderr,"X\n");
|
|
||||||
if (fp==NULL){
|
if (fp==NULL){
|
||||||
fprintf(stderr,"VO: [aa] cannot open %s for writing, so we'll not use linux driver\n", fname);
|
fprintf(stderr,"VO: [aa] cannot open %s for writing, so we'll not use linux driver\n", fname);
|
||||||
aa_recommendhidisplay("curses");
|
aa_recommendlowdisplay("linux");
|
||||||
aa_recommendhidisplay("X11");
|
|
||||||
}else fclose(fp);
|
}else fclose(fp);
|
||||||
}
|
}
|
||||||
c = aa_autoinit(&aa_defparams);
|
c = aa_autoinit(&aa_defparams);
|
||||||
@ -629,12 +630,19 @@ draw_osd(void){
|
|||||||
* the osdbuffer is written the next show_image/flip_page
|
* the osdbuffer is written the next show_image/flip_page
|
||||||
* into aatextbuf
|
* into aatextbuf
|
||||||
*/
|
*/
|
||||||
|
char * vo_osd_text_save;
|
||||||
|
int vo_osd_progbar_type_save;
|
||||||
|
|
||||||
memset(osdbuffer,0,aa_scrwidth(c)*aa_scrheight(c));
|
memset(osdbuffer,0,aa_scrwidth(c)*aa_scrheight(c));
|
||||||
printosdprogbar();
|
printosdprogbar();
|
||||||
/* let vo_draw_text only write subtitle */
|
/* let vo_draw_text only write subtitle */
|
||||||
vo_osd_text=0;
|
vo_osd_text_save=vo_osd_text; /* we have to save the osd_text */
|
||||||
|
vo_osd_text=NULL;
|
||||||
|
vo_osd_progbar_type_save=vo_osd_progbar_type;
|
||||||
vo_osd_progbar_type=-1;
|
vo_osd_progbar_type=-1;
|
||||||
vo_draw_text(aa_scrwidth(c), aa_scrheight(c), draw_alpha);
|
vo_draw_text(aa_scrwidth(c), aa_scrheight(c), draw_alpha);
|
||||||
|
vo_osd_text=vo_osd_text_save;
|
||||||
|
vo_osd_progbar_type=vo_osd_progbar_type_save;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user