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.
This commit is contained in:
Uoti Urpala 2011-07-10 03:20:47 +03:00
parent 13151d7b69
commit 5846a5e8e0
1 changed files with 2 additions and 1 deletions

View File

@ -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) {