[FFmpeg-cvslog] avfilter/vf_decimate: Use the correct frame in difference calculation
Michael Niedermayer
git at videolan.org
Sun Mar 13 01:19:51 CET 2016
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Wed Dec 16 18:54:55 2015 +0100| [58cb1fb1fe925c85161f23d5a368f126317cb292] | committer: Michael Niedermayer
avfilter/vf_decimate: Use the correct frame in difference calculation
Fixes Ticket4964
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=58cb1fb1fe925c85161f23d5a368f126317cb292
---
libavfilter/vf_decimate.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c
index 4cf0771..39c3331 100644
--- a/libavfilter/vf_decimate.c
+++ b/libavfilter/vf_decimate.c
@@ -164,9 +164,12 @@ 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) {
dm->queue[dm->fid].maxbdiff = INT64_MAX;
dm->queue[dm->fid].totdiff = INT64_MAX;
More information about the ffmpeg-cvslog
mailing list