Imported Debian version 2.5.0~trusty1.1
[deb_ffmpeg.git] / ffmpeg / libavfilter / vf_yadif.c
index 70670c3eb9d7a0196345e709ebc4aa99714f66c1..da6ee70c23bfaf57a99fe61e2a50d8cb0a3ce487 100644 (file)
@@ -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);