Commit 0c9abf21 authored by Himangi Saraogi's avatar Himangi Saraogi Committed by Michael Niedermayer

avfilter/vf_detelecine: Fix uninitialized array index error

Fixes the defect CID 1292301
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5cba5291
......@@ -265,12 +265,16 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
out = 1;
} else if (len == 1) {
// fill in the EARLIER field from the new pic
av_image_copy_plane(s->frame->data[i] + s->frame->linesize[i] * s->first_field,
s->frame->linesize[i] * 2,
inpicref->data[i] + inpicref->linesize[i] * s->first_field,
inpicref->linesize[i] * 2,
s->stride[i],
(s->planeheight[i] - s->first_field + 1) / 2);
for (i = 0; i < s->nb_planes; i++) {
av_image_copy_plane(s->frame->data[i] +
s->frame->linesize[i] * s->first_field,
s->frame->linesize[i] * 2,
inpicref->data[i] +
inpicref->linesize[i] * s->first_field,
inpicref->linesize[i] * 2, s->stride[i],
(s->planeheight[i] - s->first_field + 1) / 2);
}
// TODO: not sure about the other field
len--;
......
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