Commit e2478631 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

video_output: also drop late pre-rendered pictures

The filter producing the drained pictures may be very slow and return pictures
too late.
parent 161d86de
......@@ -1106,10 +1106,17 @@ static picture_t *ThreadGetPrerenderedLocked(vout_thread_sys_t *vout, bool reuse
vout_thread_sys_t *sys = vout;
picture_t *picture = filter_chain_VideoFilter(sys->filter.chain_static, NULL);
assert(!reuse_decoded || !picture);
picture_t *picture = NULL;
while (!picture) {
picture = filter_chain_VideoFilter(sys->filter.chain_static, NULL);
if (picture && DropLate(vout, picture, can_drop_late, paused))
picture = NULL;
continue; // drain again
if (picture)
picture_t *decoded;
if (reuse_decoded && sys->displayed.decoded) {
decoded = picture_Hold(sys->displayed.decoded);
Supports Markdown
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