diff options
author | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-20 22:43:34 +0000 |
---|---|---|
committer | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-20 22:43:34 +0000 |
commit | 8337d9c26faa3966da2d558cf6912ea51a3128c2 (patch) | |
tree | ed2f020ae31584d6dd1e5bd18896f7179faec38a | |
parent | d66ad5a63ef47ed48c9852aa11eff13b4d60f850 (diff) |
subtitle positioning patch by Jiri Svoboda
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4774 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | cfg-mplayer.h | 2 | ||||
-rw-r--r-- | libvo/sub.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/cfg-mplayer.h b/cfg-mplayer.h index 67aa5cf7fb..e479c4b7e6 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -57,6 +57,7 @@ extern int sub_utf8; #ifdef USE_ICONV extern char *sub_cp; #endif +extern int sub_pos; #endif #ifdef USE_OSD @@ -174,6 +175,7 @@ static config_t mplayer_opts[]={ {"nounicode", &sub_unicode, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"utf8", &sub_utf8, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"noutf8", &sub_utf8, CONF_TYPE_FLAG, 0, 1, 0, NULL}, + {"subpos",&sub_pos, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL}, #endif #ifdef USE_OSD {"font", &font_name, CONF_TYPE_STRING, 0, 0, 0, NULL}, diff --git a/libvo/sub.c b/libvo/sub.c index a5ba3b84a1..c9ec41d291 100644 --- a/libvo/sub.c +++ b/libvo/sub.c @@ -27,6 +27,7 @@ font_desc_t* vo_font=NULL; unsigned char* vo_osd_text=NULL; int sub_unicode=0; int sub_utf8=0; +int sub_pos=100; inline static void vo_draw_text_osd(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){ unsigned char *cp=vo_osd_text; @@ -252,7 +253,7 @@ inline static void vo_draw_text_sub(int dxs,int dys,void (*draw_alpha)(int x0,in } } - y = memy; + if (memy < (dys * sub_pos / 100)) { y = memy; } else { y = dys * sub_pos /100;}; // printf("lines=%d y=%d\n",lines,y); |