mirror of https://github.com/mpv-player/mpv
player: don't free root filter while it's still needed
Sometimes, playback needs to be fully uninitialized and reinitialized without "officially" closing and reopening the playlist entry. This happens with PT_RELOAD_FILE, which is triggered by edition switching and also DVD/BD title switching. (Not really sure why it goes through so much pain for such obscure cases. All it gains is not resetting "local" options, and not signaling a reload to the client API. Whatever.) The recent filter change freed filter_root too early without recreating it, so it crashed on edition switching. Fixes #5587.
This commit is contained in:
parent
0200a71e2f
commit
f706076dd1
|
@ -1420,7 +1420,6 @@ terminate_playback:
|
|||
uninit_demuxer(mpctx);
|
||||
if (!opts->gapless_audio && !mpctx->encode_lavc_ctx)
|
||||
uninit_audio_out(mpctx);
|
||||
TA_FREEP(&mpctx->filter_root);
|
||||
|
||||
mpctx->playback_initialized = false;
|
||||
|
||||
|
@ -1432,6 +1431,7 @@ terminate_playback:
|
|||
|
||||
m_config_restore_backups(mpctx->mconfig);
|
||||
|
||||
TA_FREEP(&mpctx->filter_root);
|
||||
talloc_free(mpctx->filtered_tags);
|
||||
mpctx->filtered_tags = NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue