deinterlace: fix arithmetic for unsigned comparison
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 20 Jan 2012 15:57:52 +0000 (16:57 +0100)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 20 Jan 2012 16:10:33 +0000 (17:10 +0100)
gst/deinterlace/gstdeinterlace.c

index 373fb20..a79b836 100644 (file)
@@ -1706,8 +1706,8 @@ restart:
       gst_buffer_set_caps (outbuf, GST_PAD_CAPS (self->srcpad));
     }
 
-    g_return_val_if_fail (self->history_count - 1 -
-        gst_deinterlace_method_get_latency (self->method) >= 0, GST_FLOW_ERROR);
+    g_return_val_if_fail (self->history_count >=
+        1 + gst_deinterlace_method_get_latency (self->method), GST_FLOW_ERROR);
 
     buf =
         self->field_history[self->history_count - 1 -