summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2012-09-08 13:43:26 -0700
committerDavid Schleef <ds@schleef.org>2012-09-08 13:44:09 -0700
commit7c995dfe160605f49800296363bd2661e23e7725 (patch)
tree862ada15f19f849455ab3ec361e5f0d85341bdaa /gst
parent180e42b381a10b61e36a672c806ed59c0d72ae26 (diff)
deinterlace: avoid triggering warnings in video lib
Diffstat (limited to 'gst')
-rw-r--r--gst/deinterlace/gstdeinterlacemethod.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/deinterlace/gstdeinterlacemethod.c b/gst/deinterlace/gstdeinterlacemethod.c
index 992786848..bfa982a3b 100644
--- a/gst/deinterlace/gstdeinterlacemethod.c
+++ b/gst/deinterlace/gstdeinterlacemethod.c
@@ -108,6 +108,7 @@ gst_deinterlace_method_setup_impl (GstDeinterlaceMethod * self,
GstVideoFormat format, gint width, gint height)
{
gint i;
+ gint n_components;
GstDeinterlaceMethodClass *klass = GST_DEINTERLACE_METHOD_GET_CLASS (self);
self->format = format;
@@ -119,7 +120,8 @@ gst_deinterlace_method_setup_impl (GstDeinterlaceMethod * self,
if (format == GST_VIDEO_FORMAT_UNKNOWN)
return;
- for (i = 0; i < 4; i++) {
+ n_components = 3 + gst_video_format_has_alpha (format);
+ for (i = 0; i < n_components; i++) {
self->width[i] = gst_video_format_get_component_width (format, i, width);
self->height[i] = gst_video_format_get_component_height (format, i, height);
self->offset[i] =