gst-plugins-good: deinterlace: make interlacedness test deterministic
Vincent Penquerc'h
vincent at kemper.freedesktop.org
Mon Jan 16 04:15:20 PST 2012
Module: gst-plugins-good
Branch: master
Commit: 4d51c68fc0d9c43764fba3616a74e19720742da4
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=4d51c68fc0d9c43764fba3616a74e19720742da4
Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date: Mon Jan 16 12:13:50 2012 +0000
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 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c
index 6e71bce..373fb20 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;
More information about the gstreamer-commits
mailing list