Browse Source

avfilter/vf_yadif: fix filtering a single image

Found-by: wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.3
Michael Niedermayer 11 years ago
parent
commit
0f9f24c9cf
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      libavfilter/vf_yadif.c

+ 5
- 5
libavfilter/vf_yadif.c View File

@@ -325,8 +325,9 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
yadif->cur = yadif->next;
yadif->next = frame;

if (!yadif->cur)
return 0;
if (!yadif->cur &&
!(yadif->cur = av_frame_clone(yadif->next)))
return AVERROR(ENOMEM);

if (checkstride(yadif, yadif->next, yadif->cur)) {
av_log(ctx, AV_LOG_VERBOSE, "Reallocating frame due to differing stride\n");
@@ -352,9 +353,8 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
return ff_filter_frame(ctx->outputs[0], yadif->out);
}

if (!yadif->prev &&
!(yadif->prev = av_frame_clone(yadif->cur)))
return AVERROR(ENOMEM);
if (!yadif->prev)
return 0;

yadif->out = ff_get_video_buffer(ctx->outputs[0], link->w, link->h);
if (!yadif->out)


Loading…
Cancel
Save