Mercurial > mplayer.hg
diff libvo/sub.c @ 7628:d6608342591d
This patch adds the functionality to disable/enable subtitles while playing
a video. I mapped it to the input-keyword "sub_visibility".
This keyword is mapped to the 'v' key on the keyboard. I tested the patch
with old-fashioned subtitles, with freetype subtitles and DVD subtitles.
Works fine. The patch also includes documentation updates.
patch by Uwe.Reder@3SOFT.de
author | arpi |
---|---|
date | Sun, 06 Oct 2002 17:40:51 +0000 |
parents | 6abc330b5b32 |
children | 9fc45fe0d444 |
line wrap: on
line diff
--- a/libvo/sub.c Sun Oct 06 17:31:36 2002 +0000 +++ b/libvo/sub.c Sun Oct 06 17:40:51 2002 +0000 @@ -33,6 +33,7 @@ int sub_unicode=0; int sub_utf8=0; int sub_pos=100; +int sub_visibility=1; // return the real height of a char: static inline int get_height(int c,int h){ @@ -298,8 +299,8 @@ int h,lasth; obj->flags|=OSDFLAG_CHANGED|OSDFLAG_VISIBLE; - - if(!vo_sub || !vo_font){ + + if(!vo_sub || !vo_font || !sub_visibility){ obj->flags&=~OSDFLAG_VISIBLE; return; } @@ -504,7 +505,7 @@ vo_update_text_progbar(obj,dxs,dys); break; case OSDTYPE_SPU: - if(vo_spudec && spudec_visible(vo_spudec)){ + if(sub_visibility && vo_spudec && spudec_visible(vo_spudec)){ vo_update_spudec_sub(obj, dxs, dys); obj->flags|=OSDFLAG_VISIBLE|OSDFLAG_CHANGED; }