From 9b8d3acc8b95771de2f2be2d687290f71979e458 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 26 Jan 2015 11:38:23 +0100 Subject: 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. --- options/options.c | 1 + player/screenshot.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/options/options.c b/options/options.c index 1541f6f323..e5e5975224 100644 --- a/options/options.c +++ b/options/options.c @@ -778,6 +778,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 702e2dd766..0f0ac72419 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, '%'); -- cgit v1.2.3