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
This commit is contained in:
Vincent Penquerc'h 2014-04-07 12:16:17 +01:00
parent 5b9945e0a6
commit 1d7735b1d6

View file

@ -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);