summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-08 23:54:05 +0200
committerwm4 <wm4@nowhere>2014-06-09 01:20:53 +0200
commit3e2f16a89e625d9798217f39cc5be6211059acf9 (patch)
treeab74ca3b6974058904414bc4ea71cda212de88de /options
parentda89af10768f75ceec9b9c0256649da6f4d843a2 (diff)
downloadmpv-3e2f16a89e625d9798217f39cc5be6211059acf9.tar.bz2
mpv-3e2f16a89e625d9798217f39cc5be6211059acf9.tar.xz
audio: add a "weak" gapless mode, and make it default
Basically, this allows gapless playback with similar files (including the ordered chapter case), while still being robust in general. The implementation is quite simplistic on purpose, in order to avoid all the weird corner cases that can occur when creating the filter chain. The consequence is that it might do not-gapless playback in more cases when needed, but if that bothers you, you still can use the normal gapless mode. Just using "--gapless-audio" or "--gapless-audio=yes" selects the old mode.
Diffstat (limited to 'options')
-rw-r--r--options/options.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/options/options.c b/options/options.c
index 8f071345d5..e1e8cdb99e 100644
--- a/options/options.c
+++ b/options/options.c
@@ -460,7 +460,10 @@ const m_option_t mp_opts[] = {
{"no", 0},
{"yes", 1}, {"", 1})),
OPT_STRING("volume-restore-data", mixer_restore_volume_data, 0),
- OPT_FLAG("gapless-audio", gapless_audio, M_OPT_FIXED),
+ OPT_CHOICE("gapless-audio", gapless_audio, M_OPT_FIXED | M_OPT_OPTIONAL_PARAM,
+ ({"no", 0},
+ {"yes", 1}, {"", 1},
+ {"weak", -1})),
OPT_GEOMETRY("geometry", vo.geometry, 0),
OPT_SIZE_BOX("autofit", vo.autofit, 0),