[MPlayer-cvslog] r35369 - in trunk: DOCS/man/en/mplayer.1 cfg-common.h sub/sub.c

reimar subversion at mplayerhq.hu
Thu Nov 8 19:26:14 CET 2012


Author: reimar
Date: Thu Nov  8 19:26:13 2012
New Revision: 35369

Log:
Support subpos values > 100 that allow the subtitles
to be clipped a bit.

Modified:
   trunk/cfg-common.h
   trunk/sub/sub.c

Changes in other areas also in this revision:
Modified:
   trunk/DOCS/man/en/mplayer.1

Modified: trunk/cfg-common.h
==============================================================================
--- trunk/cfg-common.h	Wed Nov  7 00:09:28 2012	(r35368)
+++ trunk/cfg-common.h	Thu Nov  8 19:26:13 2012	(r35369)
@@ -610,7 +610,7 @@ const m_option_t common_opts[] = {
     {"font", &font_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
     {"subfont", &sub_font_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
     {"ffactor", &font_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 10.0, NULL},
-    {"subpos", &sub_pos, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
+    {"subpos", &sub_pos, CONF_TYPE_INT, CONF_RANGE, 0, 150, NULL},
     {"subalign", &sub_alignment, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
     {"subwidth", &sub_width_p, CONF_TYPE_INT, CONF_RANGE, 10, 100, NULL},
     {"spualign", &spu_alignment, CONF_TYPE_INT, CONF_RANGE, -1, 2, NULL},

Modified: trunk/sub/sub.c
==============================================================================
--- trunk/sub/sub.c	Wed Nov  7 00:09:28 2012	(r35368)
+++ trunk/sub/sub.c	Thu Nov  8 19:26:13 2012	(r35369)
@@ -979,8 +979,10 @@ static inline void vo_update_text_sub(mp
 
     if (obj->y < 0)
         obj->y = 0;
+    if (sub_pos <= 100 && obj->y > dys - h)
+        obj->y = FFMAX(dys - h, 0);
     if (obj->y > dys - h)
-        obj->y = dys - h;
+        h = FFMAX(dys - obj->y, 0);
 
     obj->bbox.y2 = obj->y + h;
 


More information about the MPlayer-cvslog mailing list