diff options
author | Edward Hervey <bilboed@bilboed.com> | 2014-06-24 13:46:17 +0200 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2014-06-24 14:51:32 +0200 |
commit | aaee4dc23bd8498f55ed42cbb02f477bb9b54a94 (patch) | |
tree | 5ea8ea4619beb88bd65c265ae8fc9ce7fd3c830d /gst/geometrictransform | |
parent | 104816e9069dbafde6e1b86b3bd87d88b2017d54 (diff) | |
download | gstreamer-plugins-bad-aaee4dc23bd8498f55ed42cbb02f477bb9b54a94.tar.gz |
all: Don't declare variables in 'for' loops
Diffstat (limited to 'gst/geometrictransform')
-rw-r--r-- | gst/geometrictransform/gstgeometrictransform.c | 4 | ||||
-rw-r--r-- | gst/geometrictransform/gstperspective.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/gst/geometrictransform/gstgeometrictransform.c b/gst/geometrictransform/gstgeometrictransform.c index a2377344e..7cfaafd0e 100644 --- a/gst/geometrictransform/gstgeometrictransform.c +++ b/gst/geometrictransform/gstgeometrictransform.c @@ -229,7 +229,7 @@ gst_geometric_transform_transform_frame (GstVideoFilter * vfilter, { GstGeometricTransform *gt; GstGeometricTransformClass *klass; - gint x, y; + gint x, y, i; GstFlowReturn ret = GST_FLOW_OK; gdouble *ptr; guint8 *in_data; @@ -245,7 +245,7 @@ gst_geometric_transform_transform_frame (GstVideoFilter * vfilter, /* in AYUV black is not just all zeros: * 0x10 is black for Y, * 0x80 is black for Cr and Cb */ - for (int i = 0; i < out_frame->map[0].size; i += 4) + for (i = 0; i < out_frame->map[0].size; i += 4) GST_WRITE_UINT32_BE (out_data + i, 0xff108080); } else { memset (out_data, 0, out_frame->map[0].size); diff --git a/gst/geometrictransform/gstperspective.c b/gst/geometrictransform/gstperspective.c index 0f33eb6a6..e9ed2300c 100644 --- a/gst/geometrictransform/gstperspective.c +++ b/gst/geometrictransform/gstperspective.c @@ -80,10 +80,11 @@ get_array_from_matrix (GstPerspective * self) { GValue v = { 0, }; GValueArray *va; + int i; va = g_value_array_new (1); - for (int i = 0; i < 9; i++) { + for (i = 0; i < 9; i++) { g_value_init (&v, G_TYPE_DOUBLE); g_value_set_double (&v, self->matrix[i]); g_value_array_append (va, &v); |