# HG changeset patch # User atmos4 # Date 1014245014 0 # Node ID 976bf6a9ded5aba1d23ef4070f10fd44d6a6af36 # Parent 9c65efb6ac7e91c28d78753649fb31495c70486d subtitle positioning patch by Jiri Svoboda diff -r 9c65efb6ac7e -r 976bf6a9ded5 cfg-mplayer.h --- a/cfg-mplayer.h Wed Feb 20 22:42:46 2002 +0000 +++ b/cfg-mplayer.h Wed Feb 20 22:43:34 2002 +0000 @@ -57,6 +57,7 @@ #ifdef USE_ICONV extern char *sub_cp; #endif +extern int sub_pos; #endif #ifdef USE_OSD @@ -174,6 +175,7 @@ {"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 -r 9c65efb6ac7e -r 976bf6a9ded5 libvo/sub.c --- a/libvo/sub.c Wed Feb 20 22:42:46 2002 +0000 +++ b/libvo/sub.c Wed Feb 20 22:43:34 2002 +0000 @@ -27,6 +27,7 @@ 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 @@ } } - y = memy; + if (memy < (dys * sub_pos / 100)) { y = memy; } else { y = dys * sub_pos /100;}; // printf("lines=%d y=%d\n",lines,y);