diff options
author | Himangi Saraogi <himangi774@gmail.com> | 2015-03-31 10:13:46 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-31 13:11:17 +0300 |
commit | 0c9abf211931b1a5e3b5d1ebfac3d2214103ae2f (patch) | |
tree | 66bff4c424c4aea3d5ef63ea728ef17fb6dacd67 /libavfilter | |
parent | 5cba5291a7675e960b34fe906ce47c8622d774ee (diff) |
avfilter/vf_detelecine: Fix uninitialized array index error
Fixes the defect CID 1292301
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_detelecine.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libavfilter/vf_detelecine.c b/libavfilter/vf_detelecine.c index 218a8c8e70..8ad7ae32f2 100644 --- a/libavfilter/vf_detelecine.c +++ b/libavfilter/vf_detelecine.c @@ -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--; |