From 98dc8206ae61a857db6017e7244a9af0e578adc6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 20 Feb 2014 14:46:23 +0100 Subject: options: handle escape sequences in e.g. --playing-msg differently M_OPT_PARSE_ESCAPES was pretty stupid, and broke the (useful) assumption that string variables contain exactly the same value as set by the option. Simplify it, and move escape handling to the place where it's used. Escape handling itself is not terribly useful, but still allows useful things like multiline custom OSD with "\n". --- player/playloop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'player/playloop.c') diff --git a/player/playloop.c b/player/playloop.c index 88adf9e35c..87236a34f0 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -1244,7 +1244,8 @@ void run_playloop(struct MPContext *mpctx) if (opts->playing_msg && !mpctx->playing_msg_shown && new_frame_shown) { mpctx->playing_msg_shown = true; - char *msg = mp_property_expand_string(mpctx, opts->playing_msg); + char *msg = + mp_property_expand_escaped_string(mpctx, opts->playing_msg); MP_INFO(mpctx, "%s\n", msg); talloc_free(msg); } -- cgit v1.2.3