diff --git a/libavfilter/vf_interlace.c b/libavfilter/vf_interlace.c index 7cf2e1fc87..eab5cab3fb 100644 --- a/libavfilter/vf_interlace.c +++ b/libavfilter/vf_interlace.c @@ -132,7 +132,7 @@ static void copy_picture_field(AVFrame *src_frame, AVFrame *dst_frame, av_assert0(linesize >= 0); - lines /= 2; + lines = (lines + (field_type == FIELD_UPPER)) / 2; if (field_type == FIELD_LOWER) srcp += src_frame->linesize[plane]; if (field_type == FIELD_LOWER)