From 4d51c68fc0d9c43764fba3616a74e19720742da4 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Mon, 16 Jan 2012 12:13:50 +0000 Subject: [PATCH] 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. --- gst/deinterlace/gstdeinterlace.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c index 6e71bce22f..373fb20768 100644 --- a/gst/deinterlace/gstdeinterlace.c +++ b/gst/deinterlace/gstdeinterlace.c @@ -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;