[FFmpeg-cvslog] avfilter/vf_framerate: unbreak flushing

Paul B Mahol git at videolan.org
Sat Sep 12 21:56:30 CEST 2015


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Sep 11 10:09:33 2015 +0000| [16f08b7a0918ec93d377bfd151e6551da4c3b38f] | committer: Paul B Mahol

avfilter/vf_framerate: unbreak flushing

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=16f08b7a0918ec93d377bfd151e6551da4c3b38f
---

 libavfilter/vf_framerate.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_framerate.c b/libavfilter/vf_framerate.c
index f4ff481..1072e2d 100644
--- a/libavfilter/vf_framerate.c
+++ b/libavfilter/vf_framerate.c
@@ -666,9 +666,12 @@ static int request_frame(AVFilterLink *outlink)
     // if there is no "next" frame AND we are not in flush then get one from our input filter
     if (!s->srce[s->frst] && !s->flush) {
         ff_dlog(ctx, "request_frame() call source's request_frame()\n");
-        if ((val = ff_request_frame(outlink->src->inputs[0])) < 0) {
+        val = ff_request_frame(outlink->src->inputs[0]);
+        if (val < 0 && (val != AVERROR_EOF)) {
             ff_dlog(ctx, "request_frame() source's request_frame() returned error:%d\n", val);
             return val;
+        } else if (val == AVERROR_EOF) {
+            s->flush = 1;
         }
         ff_dlog(ctx, "request_frame() source's request_frame() returned:%d\n", val);
         return 0;



More information about the ffmpeg-cvslog mailing list