diff options
author | Uoti Urpala <uau@mplayer2.org> | 2011-07-10 03:20:47 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-07-10 03:20:47 +0300 |
commit | 5846a5e8e07c498e25a738335b324231f7db9a3c (patch) | |
tree | e6eec0cd46ea3f55a59103bef355766381e77d99 /mplayer.c | |
parent | 13151d7b69974a600873e8513d1d509338b34779 (diff) | |
download | mpv-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.
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) { |