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) ...@@ -981,6 +981,8 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
subpicture_Delete(subpic); subpicture_Delete(subpic);
return VLC_EGENERIC; return VLC_EGENERIC;
} }
todisplay = sys->display.filtered;
} }
vout_chrono_Stop(&vout->p->render); vout_chrono_Stop(&vout->p->render);
...@@ -1004,10 +1006,7 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced) ...@@ -1004,10 +1006,7 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
/* Display the direct buffer returned by vout_RenderPicture */ /* Display the direct buffer returned by vout_RenderPicture */
vout->p->displayed.date = mdate(); vout->p->displayed.date = mdate();
vout_display_Display(vd, vout_display_Display(vd, todisplay, subpic);
sys->display.filtered ? sys->display.filtered
: todisplay,
subpic);
sys->display.filtered = NULL; sys->display.filtered = NULL;
vout_statistic_AddDisplayed(&vout->p->statistic, 1); 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