[FFmpeg-devel] [PATCH 2/2] avfilter/vf_decimate: Use the correct frame in difference calculation
Michael Niedermayer
michaelni at gmx.at
Wed Dec 16 18:54:55 CET 2015
From: Michael Niedermayer <michael at niedermayer.cc>
Fixes Ticket4964
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavfilter/vf_decimate.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c
index a563859..9f382ae 100644
--- a/libavfilter/vf_decimate.c
+++ b/libavfilter/vf_decimate.c
@@ -164,9 +164,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
return 0;
dm->got_frame[INPUT_MAIN] = dm->got_frame[INPUT_CLEANSRC] = 0;
+ if (dm->ppsrc)
+ in = dm->clean_src[dm->fid];
+
if (in) {
/* update frame metrics */
- prv = dm->fid ? dm->queue[dm->fid - 1].frame : dm->last;
+ prv = dm->fid ? (dm->ppsrc ? dm->clean_src[dm->fid - 1] : dm->queue[dm->fid - 1].frame) : dm->last;
+
if (!prv)
prv = in;
calc_diffs(dm, &dm->queue[dm->fid], prv, in);
--
1.7.9.5
More information about the ffmpeg-devel
mailing list