vo_vdpau: Fix memory corruption bug with MP_IMGTYPE_NUMBERED

The way vo_vdpau kept references to vf mpi objects was unsafe; with
fixed-vo enabled the vf object could be destroyed and a new one
created, but vo_vdpau would still keep the now stale references and
modify memory through them to adjust usage counts. Send a VOCTRL_RESET
from vf_vo uninit() to allow vo_vdpau to erase such references.
This commit is contained in:
Uoti Urpala 2009-09-18 17:13:35 +03:00
parent 350fc4f5a2
commit 56088ff4dc
1 changed files with 3 additions and 0 deletions

View File

@ -203,6 +203,9 @@ static void draw_slice(struct vf_instance* vf,
static void uninit(struct vf_instance* vf)
{
if (vf->priv) {
/* Allow VO (which may live on to work with another instance of vf_vo)
* to get rid of numbered-mpi references that will now be invalid. */
vo_control(video_out, VOCTRL_RESET, NULL);
#ifdef CONFIG_ASS
if (vf->priv->ass_priv)
ass_renderer_done(vf->priv->ass_priv);