summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorvoroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-09-01 01:22:30 +0000
committervoroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-09-01 01:22:30 +0000
commitb61657c12c4af79bfbe932a49ca321edf675901a (patch)
tree771895c0283b0ecbd1e462b49e098447c9531f0d /libvo
parentb53264188b21e4940a6482b829aac5f1c7f9440b (diff)
downloadmpv-b61657c12c4af79bfbe932a49ca321edf675901a.tar.bz2
mpv-b61657c12c4af79bfbe932a49ca321edf675901a.tar.xz
Proper support for flashing chars in teletext pages.
Patch from Otvos Attila oattila at chello dot hu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24312 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/sub.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libvo/sub.c b/libvo/sub.c
index c882759bf9..24d4935e7b 100644
--- a/libvo/sub.c
+++ b/libvo/sub.c
@@ -270,7 +270,7 @@ static void tt_draw_alpha_buf(mp_osd_obj_t* obj, int x0,int y0, int w,int h, uns
}
inline static void vo_update_text_teletext(mp_osd_obj_t *obj, int dxs, int dys)
{
- int h=0,w=0,i,j,font;
+ int h=0,w=0,i,j,font,flashon;
int wm,hm;
int color;
int x,y,x0,y0;
@@ -290,6 +290,7 @@ inline static void vo_update_text_teletext(mp_osd_obj_t *obj, int dxs, int dys)
obj->flags&=~OSDFLAG_VISIBLE;
return;
}
+ flashon=(GetTimer()/1000000)%2;
switch(vo_osd_teletext_half){
case TT_ZOOM_TOP_HALF:
start_row=0;
@@ -404,10 +405,11 @@ inline static void vo_update_text_teletext(mp_osd_obj_t *obj, int dxs, int dys)
x=x0;
for(j=0;j<cols;j++){
tc=tdp[(i+start_row)*VBI_COLUMNS+j];
- if(!tc.gfx){
+ if(!tc.gfx || (tc.flh && !flashon)){
/* Rendering one text character */
draw_alpha_buf(obj,x,y,wm,hm,buf[tc.bg],buf[8],wm);
if(tc.unicode!=0x20 && tc.unicode!=0x00 && !tc.ctl &&
+ (!tc.flh || flashon) &&
(font=vo_font->font[tc.unicode])>=0 && y+hm<dys){
tt_draw_alpha_buf(obj,x,y,vo_font->width[tc.unicode],vo_font->height,
vo_font->pic_b[font]->bmp+vo_font->start[tc.unicode]-vo_font->charspace*vo_font->pic_a[font]->w,