From: Vincent Penquerc'h Date: Mon, 7 Apr 2014 11:16:17 +0000 (+0100) Subject: deinterlace: guard against finding no suitable pattern X-Git-Tag: 1.19.3~509^2~4704 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d7735b1d625195ca61812d5fe8ecc2632521256;p=platform%2Fupstream%2Fgstreamer.git deinterlace: guard against finding no suitable pattern The code handles a -1 pattern index, and it seems plausible that a pattern might be found later, so it seems best to not send an element error here. Coverity 1139766 --- diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c index 7b00b11e9d..3d2087921f 100644 --- a/gst/deinterlace/gstdeinterlace.c +++ b/gst/deinterlace/gstdeinterlace.c @@ -1425,6 +1425,11 @@ gst_deinterlace_get_pattern_lock (GstDeinterlace * self, gboolean * flush_one) } } + if (pattern < 0) { + GST_WARNING_OBJECT (self, "Failed to select a pattern"); + return; + } + GST_DEBUG_OBJECT (self, "Final pattern match result: pa %d, ph %d, l %d, s %d", pattern, phase, telecine_patterns[pattern].length, score);