video: actually flush filter chain

Frames buffered in filters weren't flushed, so on EOF, the last frames
were dropped, depending on how much filters buffered. Oops.

Test case: "mpv something.jpg --vf=buffer"
This commit is contained in:
wm4 2014-07-30 22:44:46 +02:00
parent f8ab732ac3
commit c38013bffb
1 changed files with 4 additions and 1 deletions

View File

@ -401,8 +401,11 @@ static int video_decode_and_filter(struct MPContext *mpctx)
return r;
if (d_video->waiting_decoded_mpi)
d_video->decoder_output = d_video->waiting_decoded_mpi->params;
if (!d_video->waiting_decoded_mpi && (r == VD_EOF || r < 0))
if (!d_video->waiting_decoded_mpi && (r == VD_EOF || r < 0)) {
if (vf_output_frame(vf, true) > 0)
return VD_PROGRESS;
return VD_EOF; // true EOF
}
}
// Image will be filtered on the next iteration.