mirror of
https://github.com/mpv-player/mpv
synced 2024-12-14 19:05:33 +00:00
Allow overriding [Script Info] parameters with -ass-force-style option.
Patch by Anton Khirnov, wyskas gmail com. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25610 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
66b001c5aa
commit
518f4e003c
@ -2012,12 +2012,14 @@ Set the scale coefficient to be used for fonts in the SSA/ASS renderer.
|
||||
.
|
||||
.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
|
||||
.
|
||||
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user