Commit 58cb1fb1 authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/vf_decimate: Use the correct frame in difference calculation

Fixes Ticket4964
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 52e7f6b1
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment