summaryrefslogtreecommitdiffstats
path: root/sub/sd.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-12-05 23:55:56 +0100
committerwm4 <wm4@nowhere>2015-12-05 23:55:56 +0100
commitff1eaea3e7f9ac2ab45b298326b96d256f487dc3 (patch)
tree7b0f0f9bcaab6f080b73c11e5318e982d0c8aa42 /sub/sd.h
parent9a240dc82e442a2f1d3d383c4b32f3eaab0a1f6a (diff)
downloadmpv-ff1eaea3e7f9ac2ab45b298326b96d256f487dc3.tar.bz2
mpv-ff1eaea3e7f9ac2ab45b298326b96d256f487dc3.tar.xz
sd_lavc: remove small gaps between subtitles
Just like with text subtitles. Move the magic constants to a common place too.
Diffstat (limited to 'sub/sd.h')
-rw-r--r--sub/sd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sub/sd.h b/sub/sd.h
index 4be48fedb8..9e6b1eb0ec 100644
--- a/sub/sd.h
+++ b/sub/sd.h
@@ -4,6 +4,11 @@
#include "dec_sub.h"
#include "demux/packet.h"
+// up to 200 ms overlaps or gaps are removed
+#define SUB_GAP_THRESHOLD 0.2
+// don't change timings if durations are smaller
+#define SUB_GAP_KEEP 0.4
+
struct sd {
struct mp_log *log;
struct MPOpts *opts;