summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-07-10 03:20:47 +0300
committerUoti Urpala <uau@mplayer2.org>2011-07-10 03:20:47 +0300
commit5846a5e8e07c498e25a738335b324231f7db9a3c (patch)
treee6eec0cd46ea3f55a59103bef355766381e77d99
parent13151d7b69974a600873e8513d1d509338b34779 (diff)
downloadmpv-5846a5e8e07c498e25a738335b324231f7db9a3c.tar.bz2
mpv-5846a5e8e07c498e25a738335b324231f7db9a3c.tar.xz
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.
-rw-r--r--mplayer.c3
1 files changed, 2 insertions, 1 deletions
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) {