X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_fieldhint.c;h=2b845e7330583dc873475ab567fc18ce59fd74da;hb=7a2b9dd060b6f057758a1ac7820b66d6c1ad1e49;hp=bdba77f90b4bcf1146fb2d3781e2f47d849ea114;hpb=a454ad670c770902f739012ff9ed4178bd9e6feb;p=ffmpeg diff --git a/libavfilter/vf_fieldhint.c b/libavfilter/vf_fieldhint.c index bdba77f90b4..2b845e73305 100644 --- a/libavfilter/vf_fieldhint.c +++ b/libavfilter/vf_fieldhint.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/avassert.h" #include "libavutil/imgutils.h" #include "libavutil/internal.h" #include "libavutil/opt.h" @@ -173,13 +174,15 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) switch (s->mode) { case 0: - top = s->frame[1 + tf - outlink->frame_count]; - bottom = s->frame[1 + bf - outlink->frame_count]; + top = s->frame[tf - outlink->frame_count + 1]; + bottom = s->frame[bf - outlink->frame_count + 1]; break; case 1: top = s->frame[1 + tf]; bottom = s->frame[1 + bf]; break; + default: + av_assert0(0); } switch (hint) {