changeset 25582:6b1d7568ae3d

Allow overriding [Script Info] parameters with -ass-force-style option. Patch by Anton Khirnov, wyskas gmail com.
author eugeni
date Sat, 05 Jan 2008 15:38:46 +0000
parents c7d66b1e270d
children 49c3148ef5c3
files DOCS/man/en/mplayer.1 libass/ass.c
diffstat 2 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1	Sat Jan 05 14:53:13 2008 +0000
+++ b/DOCS/man/en/mplayer.1	Sat Jan 05 15:38:46 2008 +0000
@@ -2012,12 +2012,14 @@
 .
 .TP
 .B \-ass\-force\-style <[Style.]Param=Value[,...]>
-Override some style parameters.
+Override some style or script info parameters.
 .sp
 .I EXAMPLE:
 .PD 0
 .RSs
 \-ass\-force\-style FontName=Arial,Default.Bold=1
+.br
+-ass-force-style PlayResY=768
 .RE
 .PD 1
 .
--- a/libass/ass.c	Sat Jan 05 14:53:13 2008 +0000
+++ b/libass/ass.c	Sat Jan 05 15:38:46 2008 +0000
@@ -337,6 +337,15 @@
 		*eq = '\0';
 		token = eq + 1;
 
+		if(!strcasecmp(*fs, "PlayResX"))
+			track->PlayResX = atoi(token);
+		else if(!strcasecmp(*fs, "PlayResY"))
+			track->PlayResY = atoi(token);
+		else if(!strcasecmp(*fs, "Timer"))
+			track->Timer = atof(token);
+		else if(!strcasecmp(*fs, "WrapStyle"))
+			track->WrapStyle = atoi(token);
+
 		dt = strrchr(*fs, '.');
 		if (dt) {
 			*dt = '\0';