From 46a39bdd4f6876f20472baebc6420b6529894bc6 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Wed, 16 Apr 2014 17:25:44 +0100 Subject: [PATCH] deinterlace: fix sign comparison history_count is unsigned, so the whole comparison will be made as unsigned, and fail to reject what it was meant to. Coverity 206204 --- gst/deinterlace/gstdeinterlace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c index 3d20879..b669302 100644 --- a/gst/deinterlace/gstdeinterlace.c +++ b/gst/deinterlace/gstdeinterlace.c @@ -1872,8 +1872,8 @@ restart: if (ret != GST_FLOW_OK) goto no_buffer; - 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 >= + gst_deinterlace_method_get_latency (self->method) + 1, GST_FLOW_ERROR); buf = self->field_history[self->history_count - 1 - -- 2.7.4