X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavfilter%2Fvf_yadif.c;fp=ffmpeg%2Flibavfilter%2Fvf_yadif.c;h=da6ee70c23bfaf57a99fe61e2a50d8cb0a3ce487;hp=70670c3eb9d7a0196345e709ebc4aa99714f66c1;hb=f6fa7814ccfe3e76514b36cf04f5cd3cb657c8cf;hpb=2ba45a602cbfa7b771effba9b11bb4245c21bc00 diff --git a/ffmpeg/libavfilter/vf_yadif.c b/ffmpeg/libavfilter/vf_yadif.c index 70670c3..da6ee70 100644 --- a/ffmpeg/libavfilter/vf_yadif.c +++ b/ffmpeg/libavfilter/vf_yadif.c @@ -342,6 +342,9 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame) return -1; } + if (!yadif->prev) + return 0; + if ((yadif->deint && !yadif->cur->interlaced_frame) || ctx->is_disabled) { yadif->out = av_frame_clone(yadif->cur); if (!yadif->out) @@ -353,9 +356,6 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame) return ff_filter_frame(ctx->outputs[0], yadif->out); } - if (!yadif->prev) - return 0; - yadif->out = ff_get_video_buffer(ctx->outputs[0], link->w, link->h); if (!yadif->out) return AVERROR(ENOMEM);