changeset 9076:92014b66ed3d

ability to disable the nonsense expand filter is a must! otherwise it's impossible to render subtitles earlier in the filter chain and then scale them down with a scale filter; huge subs will get rendered again on top!! (think dvd/vobsub where you can't just use smaller font size) if anyone has a better way to handle this, do it! (e.g. make it so that the first expand filter disabled osd for the rest of the filter chain)
author rfelker
date Fri, 24 Jan 2003 01:04:50 +0000
parents 5e51d85f7a4d
children d430529c5b4b
files cfg-mencoder.h mencoder.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-mencoder.h	Thu Jan 23 22:21:30 2003 +0000
+++ b/cfg-mencoder.h	Fri Jan 24 01:04:50 2003 +0000
@@ -180,6 +180,9 @@
 	{"vobsuboutindex", &vobsub_out_index, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
 	{"vobsuboutid", &vobsub_out_id, CONF_TYPE_STRING, 0, 0, 0, NULL},
 
+	{"autoexpand", &auto_expand, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+	{"noautoexpand", &auto_expand, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+	
 	// info header strings
 	{"info", info_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 
--- a/mencoder.c	Thu Jan 23 22:21:30 2003 +0000
+++ b/mencoder.c	Fri Jan 24 01:04:50 2003 +0000
@@ -172,6 +172,8 @@
 float sub_last_pts = -303;
 #endif
 
+int auto_expand=1;
+
 // infos are empty by default
 char *info_name=NULL;
 char *info_artist=NULL;
@@ -675,7 +677,7 @@
         mencoder_exit(1,NULL);
     }
     // append 'expand' filter, it fixes stride problems and renders osd:
-    sh_video->vfilter=vf_open_filter(sh_video->vfilter,"expand","-1:-1:-1:-1:1");
+    if (auto_expand) sh_video->vfilter=vf_open_filter(sh_video->vfilter,"expand","-1:-1:-1:-1:1");
     sh_video->vfilter=append_filters(sh_video->vfilter);
 
     mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");