diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c
index bca504c..b56abfb 100644
--- a/gst/deinterlace/gstdeinterlace.c
+++ b/gst/deinterlace/gstdeinterlace.c
@@ -1910,8 +1910,8 @@ gst_deinterlace_chain (GstPad * pad, GstBuffer * buf)
   buf = NULL;
 
   do {
-    gst_deinterlace_output_frame (self, FALSE);
-  } while (!self->need_more && self->history_count > 0);
+    ret = gst_deinterlace_output_frame (self, FALSE);
+  } while (!self->need_more && self->history_count > 0 && ret == GST_FLOW_OK);
 
   return ret;
 }
