mirror of https://github.com/mpv-player/mpv
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:
parent
f8ab732ac3
commit
c38013bffb
|
@ -401,9 +401,12 @@ 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.
|
||||
return VD_PROGRESS;
|
||||
|
|
Loading…
Reference in New Issue