deinterlace: make interlacedness test deterministic

If the interlaced flag is not present in the caps, we assume the
data is not interlaced, instead of leaving the boolean uninitialized.
This commit is contained in:
Vincent Penquerc'h 2012-01-16 12:13:50 +00:00
parent f0ac29113c
commit 4d51c68fc0

View file

@ -1000,9 +1000,10 @@ gst_deinterlace_get_interlacing_method (const GstCaps * caps)
GstDeinterlaceInterlacingMethod method = 0;
gboolean interlaced;
/* check interlaced cap */
gst_structure_get_boolean (gst_caps_get_structure (caps, 0), "interlaced",
&interlaced);
/* check interlaced cap, defaulting to FALSE */
if (!gst_structure_get_boolean (gst_caps_get_structure (caps, 0),
"interlaced", &interlaced))
interlaced = FALSE;
method =
interlaced ? GST_DEINTERLACE_INTERLACED : GST_DEINTERLACE_PROGRESSIVE;