mirror of
https://github.com/mpv-player/mpv
synced 2024-10-22 08:51:57 +02:00
vo: reset EOSD change detection when VO is re-configured
This fixes a crash with vo_gl when the switch_ratio slave command is used while a displaying an animated subtitle. switch_ratio will cause a config() call to vo_gl, which will reset all state, including the EOSD state. Next time the EOSD is rendered, its change detection will indicate that only subtitle positions have changed. The render code will attempt to access the EOSD data structures which have been deleted with config(). Fix this by forcing the change detection to indicate a full change if config() has been called. This only happens when doing switch_ratio with vo_gl, and the current subtitle is only changing positions, i.e. mp_eosd_images_t.changed == 1.
This commit is contained in:
parent
2e1cdcb9e6
commit
52f9abefa3
@ -91,6 +91,9 @@ static int config(struct vf_instance *vf,
|
||||
mp_ass_configure(vf->priv->renderer_vsfilter, vf->opts, width, height,
|
||||
vf->default_caps & VFCAP_EOSD_UNSCALED);
|
||||
}
|
||||
|
||||
// force EOSD change detection reset
|
||||
vf->priv->prev_visibility = false;
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user