mirror of
https://github.com/mpv-player/mpv
synced 2025-03-19 09:57:34 +00:00
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:
parent
13151d7b69
commit
5846a5e8e0
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user