Commit 1d7735b1 authored by Vincent Penquerc'h's avatar Vincent Penquerc'h
Browse files

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
parent 5b9945e0
...@@ -1425,6 +1425,11 @@ gst_deinterlace_get_pattern_lock (GstDeinterlace * self, gboolean * flush_one) ...@@ -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");
"Final pattern match result: pa %d, ph %d, l %d, s %d", pattern, phase, "Final pattern match result: pa %d, ph %d, l %d, s %d", pattern, phase,
telecine_patterns[pattern].length, score); telecine_patterns[pattern].length, score);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment