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; GstDeinterlaceInterlacingMethod method = 0;
gboolean interlaced; gboolean interlaced;
/* check interlaced cap */ /* check interlaced cap, defaulting to FALSE */
gst_structure_get_boolean (gst_caps_get_structure (caps, 0), "interlaced", if (!gst_structure_get_boolean (gst_caps_get_structure (caps, 0),
&interlaced); "interlaced", &interlaced))
interlaced = FALSE;
method = method =
interlaced ? GST_DEINTERLACE_INTERLACED : GST_DEINTERLACE_PROGRESSIVE; interlaced ? GST_DEINTERLACE_INTERLACED : GST_DEINTERLACE_PROGRESSIVE;