Commit dfefe47f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vout: fix use-after-free, wait on correct date

The mwait() call dereferenced a potentially no longer referenced picture
(if the display was filtered).
parent 7ac70075
......@@ -981,6 +981,8 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
subpicture_Delete(subpic);
return VLC_EGENERIC;
}
todisplay = sys->display.filtered;
}
vout_chrono_Stop(&vout->p->render);
......@@ -1004,10 +1006,7 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
/* Display the direct buffer returned by vout_RenderPicture */
vout->p->displayed.date = mdate();
vout_display_Display(vd,
sys->display.filtered ? sys->display.filtered
: todisplay,
subpic);
vout_display_Display(vd, todisplay, subpic);
sys->display.filtered = NULL;
vout_statistic_AddDisplayed(&vout->p->statistic, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment