]> granicus.if.org Git - libass/commitdiff
Allow overriding [Script Info] parameters with -ass-force-style option.
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sat, 5 Jan 2008 15:38:46 +0000 (15:38 +0000)
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sat, 5 Jan 2008 15:38:46 +0000 (15:38 +0000)
Patch by Anton Khirnov, wyskas gmail com.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25610 b3059339-0415-0410-9bf9-f77b7e298cf2

libass/ass.c

index 5cc04fdba71f14cafdc2181a0566dea1ab39d6e0..6271736e84cf92e5c2f6c40fe6fa045d70ed1381 100644 (file)
@@ -337,6 +337,15 @@ void process_force_style(ass_track_t* track) {
                *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';