summaryrefslogtreecommitdiffstats
path: root/options/options.h
diff options
context:
space:
mode:
authorRipose <ripose@protonmail.com>2023-11-22 20:13:57 -0700
committersfan5 <sfan5@live.de>2023-11-26 23:22:05 +0100
commitdea512ea38605b6e203e98c1684f819e4aa465f1 (patch)
treebd9f62b46f2a976debdf41b9c9f9e937f38be892 /options/options.h
parenta3f505d4cb2ca70071bbe849d9cf5859802ff608 (diff)
downloadmpv-dea512ea38605b6e203e98c1684f819e4aa465f1.tar.bz2
mpv-dea512ea38605b6e203e98c1684f819e4aa465f1.tar.xz
options: add secondary-sub-delay
Add --secondary-sub-delay option and decouple --sub-delay from secondary subtitles. This produces desirable behavior in most cases as secondary and primary subtitles tracks tend to be timed independently of one another. This feature is implemented by turning the sub_delay field in mp_subtitle_opts into an array of 2 floats. From here the track index is either passed around or derived when sub_delay is needed. There are some cases in dec_sub.c where it is possible for dec_sub.order (equivalent to track index) to be -1. In these cases, sub_delay is inferred as 0.
Diffstat (limited to 'options/options.h')
-rw-r--r--options/options.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/options/options.h b/options/options.h
index aa071b28f6..9f55d5b8b1 100644
--- a/options/options.h
+++ b/options/options.h
@@ -85,7 +85,7 @@ struct mp_subtitle_opts {
bool sub_visibility;
bool sec_sub_visibility;
float sub_pos;
- float sub_delay;
+ float sub_delay[2];
float sub_fps;
float sub_speed;
bool sub_forced_events_only;