diff options
author | wm4 <wm4@nowhere> | 2014-07-30 22:44:46 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-30 23:29:00 +0200 |
commit | c38013bffb130fbd60c57348a15ad1d6759c1806 (patch) | |
tree | 7a213ff4c7636b0bb29590ebeb35786f1e2bbb1e /player/video.c | |
parent | f8ab732ac3cc635dde06c195fe48905116fe9eee (diff) | |
download | mpv-c38013bffb130fbd60c57348a15ad1d6759c1806.tar.bz2 mpv-c38013bffb130fbd60c57348a15ad1d6759c1806.tar.xz |
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"
Diffstat (limited to 'player/video.c')
-rw-r--r-- | player/video.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/player/video.c b/player/video.c index 09fc61fcf0..dacf1200c5 100644 --- a/player/video.c +++ b/player/video.c @@ -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. |