[Mplayer-cvslog] CVS: main/libvo sub.c,1.7,1.8

Felix Buenemann atmosfear at users.sourceforge.net
Tue May 8 21:40:12 CEST 2001


Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv26361

Modified Files:
	sub.c 
Log Message:
Deal with unicode subs (-unicode -nounicode).


Index: sub.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/sub.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** sub.c	2001/05/06 02:26:17	1.7
--- sub.c	2001/05/08 19:40:10	1.8
***************
*** 90,93 ****
--- 90,94 ----
  
  subtitle* vo_sub=NULL;
+ int sub_unicode=0;
  
  void vo_draw_text_sub(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){
***************
*** 106,110 ****
          for(j=0;j<len;j++){
            int c=text[j];
!           int w = vo_font->width[(c<0x80)?c:(c<<8)+text[++j]];
            if(w>100) printf("gazvan: %d (%d=%c)\n",w,c,c);
            xsize+=w+vo_font->charspace;
--- 107,111 ----
          for(j=0;j<len;j++){
            int c=text[j];
!           int w = vo_font->width[sub_unicode?((c<0x80)?c:(c<<8)+text[++j]):c];
            if(w>100) printf("gazvan: %d (%d=%c)\n",w,c,c);
            xsize+=w+vo_font->charspace;
***************
*** 119,123 ****
            int c=text[j];
            int font;
!           if (c>=0x80) c=(c<<8)+text[++j];
            font = vo_font->font[c];
            if(x>=0 && x+vo_font->width[c]<dxs)
--- 120,124 ----
            int c=text[j];
            int font;
!           if (sub_unicode && (c>=0x80)) c=(c<<8)+text[++j];
            font = vo_font->font[c];
            if(x>=0 && x+vo_font->width[c]<dxs)


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list