gst: Don't declare variables inside the for loop header
authorSebastian Dröge <sebastian@centricular.com>
Tue, 13 Dec 2016 20:39:01 +0000 (22:39 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 13 Dec 2016 20:39:01 +0000 (22:39 +0200)
This is a C99 feature.

tests/check/elements/compositor.c

index cfd9cea..9721149 100644 (file)
@@ -443,8 +443,9 @@ static void
 add_interlaced_mode_to_caps (GstCaps * caps, const gchar * mode)
 {
   GstStructure *s;
+  gint i;
 
-  for (gint i = 0; i < gst_caps_get_size (caps); i++) {
+  for (i = 0; i < gst_caps_get_size (caps); i++) {
     s = gst_caps_get_structure (caps, i);
     gst_structure_set (s, "interlace-mode", G_TYPE_STRING, mode, NULL);
   }