avfilter/vf_fieldhint: Reorder operation to prevent hypothetical integer overflow

Fixes CID1355110

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/191/merge
Michael Niedermayer 9 years ago
parent 7ae4d574e8
commit be96ebdcd7
  1. 4
      libavfilter/vf_fieldhint.c

@ -174,8 +174,8 @@ 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];

Loading…
Cancel
Save