From 5846a5e8e07c498e25a738335b324231f7db9a3c Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sun, 10 Jul 2011 03:20:47 +0300 Subject: options: fix -use-filename-title crash after recent 39e373aa After commit 39e373aa8d ("options: allocate dynamic options with talloc") dynamically allocated options must be allocated with talloc. Code implementing -use-filename-title still set opts->vo_wintitle to a value from strdup(), triggering an abort when the option was freed. Fix. --- mplayer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index 2180fd8026..c8216fae90 100644 --- a/mplayer.c +++ b/mplayer.c @@ -4242,7 +4242,8 @@ while (opts->player_idle_mode && !mpctx->filename) { mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"\nPlaying %s.\n", filename_recode(mpctx->filename)); if(use_filename_title && opts->vo_wintitle == NULL) - opts->vo_wintitle = strdup(mp_basename(mpctx->filename)); + opts->vo_wintitle = talloc_strdup(NULL, + mp_basename(mpctx->filename)); } if (edl_filename) { -- cgit v1.2.3