diff options
author | wm4 <wm4@nowhere> | 2015-01-26 11:38:23 +0100 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-01-27 10:20:19 +0900 |
commit | 30e77e0fc50aaffb5ca41914e1782bfe88ef425b (patch) | |
tree | e5fdbfd0cd6814ad294623b72497fd04dc92e074 | |
parent | 328a0f9c80e348498f52dcf6533541f5651c5859 (diff) | |
download | mpv-30e77e0fc50aaffb5ca41914e1782bfe88ef425b.tar.bz2 mpv-30e77e0fc50aaffb5ca41914e1782bfe88ef425b.tar.xz |
options: list correct default value for --screenshot-template
Make the default value part of the option metadata, instead of doing
this in the screenshot code. Makes more sense with --list-options and
the command.c option metadata properties.
-rw-r--r-- | options/options.c | 1 | ||||
-rw-r--r-- | player/screenshot.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/options/options.c b/options/options.c index 9551cef4bc..6691dcbecc 100644 --- a/options/options.c +++ b/options/options.c @@ -684,6 +684,7 @@ const struct MPOpts mp_default_opts = { .sub_fix_timing = 1, .sub_cp = "auto", .mkv_subtitle_preroll_secs = 1.0, + .screenshot_template = "shot%n", .hwdec_codecs = "h264,vc1,wmv3", diff --git a/player/screenshot.c b/player/screenshot.c index 4e22afc69d..21e189c0b2 100644 --- a/player/screenshot.c +++ b/player/screenshot.c @@ -129,7 +129,7 @@ static char *create_fname(struct MPContext *mpctx, char *template, struct tm *local_time = localtime(&raw_time); if (!template || *template == '\0') - template = "shot%n"; + return NULL; for (;;) { char *next = strchr(template, '%'); |