[FFmpeg-cvslog] avfilter/vf_decimate: stop dropping last frames with ppsrc

Paul B Mahol git at videolan.org
Sun Dec 27 23:01:51 EET 2020


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Dec 27 21:59:10 2020 +0100| [4b4282bc57b63de2780333d37487a38f88fb48c7] | committer: Paul B Mahol

avfilter/vf_decimate: stop dropping last frames with ppsrc

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

 libavfilter/vf_decimate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c
index 93509d6ab3..32a4cdc535 100644
--- a/libavfilter/vf_decimate.c
+++ b/libavfilter/vf_decimate.c
@@ -267,7 +267,7 @@ static int activate(AVFilterContext *ctx)
     }
     if (ret < 0) {
         return ret;
-    } else if (dm->eof & ((1 << INPUT_MAIN) | (dm->ppsrc << INPUT_CLEANSRC))) {
+    } else if (dm->eof == ((1 << INPUT_MAIN) | ((dm->ppsrc << INPUT_CLEANSRC) * dm->ppsrc))) {
         ff_outlink_set_status(ctx->outputs[0], AVERROR_EOF, dm->last_pts);
         return 0;
     } else if (!(dm->eof & (1 << INPUT_MAIN)) && ff_inlink_acknowledge_status(ctx->inputs[INPUT_MAIN], &status, &pts)) {
@@ -279,6 +279,7 @@ static int activate(AVFilterContext *ctx)
     } else if (dm->ppsrc && !(dm->eof & (1 << INPUT_CLEANSRC)) && ff_inlink_acknowledge_status(ctx->inputs[INPUT_CLEANSRC], &status, &pts)) {
         if (status == AVERROR_EOF) { // flushing
             dm->eof |= 1 << INPUT_CLEANSRC;
+            filter_frame(ctx->inputs[INPUT_MAIN], NULL);
             return filter_frame(ctx->inputs[INPUT_CLEANSRC], NULL);
         }
     }



More information about the ffmpeg-cvslog mailing list