mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-10-08 18:37:20 +02:00
avfilter/vf_decimate: Use the correct frame in difference calculation
Fixes Ticket4964 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
52e7f6b17e
commit
58cb1fb1fe
@ -164,9 +164,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
|||||||
return 0;
|
return 0;
|
||||||
dm->got_frame[INPUT_MAIN] = dm->got_frame[INPUT_CLEANSRC] = 0;
|
dm->got_frame[INPUT_MAIN] = dm->got_frame[INPUT_CLEANSRC] = 0;
|
||||||
|
|
||||||
|
if (dm->ppsrc)
|
||||||
|
in = dm->clean_src[dm->fid];
|
||||||
|
|
||||||
if (in) {
|
if (in) {
|
||||||
/* update frame metrics */
|
/* 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) {
|
if (!prv) {
|
||||||
dm->queue[dm->fid].maxbdiff = INT64_MAX;
|
dm->queue[dm->fid].maxbdiff = INT64_MAX;
|
||||||
dm->queue[dm->fid].totdiff = INT64_MAX;
|
dm->queue[dm->fid].totdiff = INT64_MAX;
|
||||||
|
Loading…
Reference in New Issue
Block a user