From 30b0a5b98a0c68324e3d676d64e2e150e2091e03 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 10 Mar 2015 09:50:32 +0100 Subject: player: restore --dump-stats Since the recent refactoring, it was initialized _before_ the command line player options were set, and consequently could not be enabled. --- player/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/player/main.c b/player/main.c index 6d7e55d290..788977de8f 100644 --- a/player/main.c +++ b/player/main.c @@ -376,12 +376,6 @@ int mp_initialize(struct MPContext *mpctx, char **options) assert(!mpctx->initialized); - if (opts->dump_stats && opts->dump_stats[0]) { - if (mp_msg_open_stats_file(mpctx->global, opts->dump_stats) < 0) - MP_ERR(mpctx, "Failed to open stats file '%s'\n", opts->dump_stats); - } - MP_STATS(mpctx, "start init"); - update_logging(mpctx); if (options) { @@ -412,6 +406,12 @@ int mp_initialize(struct MPContext *mpctx, char **options) if (handle_help_options(mpctx)) return -2; + if (opts->dump_stats && opts->dump_stats[0]) { + if (mp_msg_open_stats_file(mpctx->global, opts->dump_stats) < 0) + MP_ERR(mpctx, "Failed to open stats file '%s'\n", opts->dump_stats); + } + MP_STATS(mpctx, "start init"); + if (opts->slave_mode) { MP_WARN(mpctx, "--slave-broken is deprecated (see manpage).\n"); opts->consolecontrols = 0; -- cgit v1.2.3