summaryrefslogtreecommitdiff
path: root/tests/examples
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2017-12-14 18:28:00 +0200
committerSebastian Dröge <sebastian@centricular.com>2017-12-14 18:28:00 +0200
commit4f7b995ae7ebc40c377377f8fc1b4571c37db918 (patch)
tree6ba1f7e8514d969bf1f1fb39d002b62ffa9e7b4c /tests/examples
parent433cc96c05cdab5aab5efd077ebd926fedebe418 (diff)
v4l2src: Fix compiler error in example caused by re-declaring `index`
../tests/examples/v4l2/v4l2src-renegotiate.c:57:13: error: ‘index’ redeclared as different kind of symbol static gint index = 0; ^
Diffstat (limited to 'tests/examples')
-rw-r--r--tests/examples/v4l2/v4l2src-renegotiate.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/examples/v4l2/v4l2src-renegotiate.c b/tests/examples/v4l2/v4l2src-renegotiate.c
index ded5ccbd6..cae28d2d6 100644
--- a/tests/examples/v4l2/v4l2src-renegotiate.c
+++ b/tests/examples/v4l2/v4l2src-renegotiate.c
@@ -54,7 +54,7 @@ static GOptionEntry entries[] = {
static GMainLoop *loop;
static GstElement *pipeline;
static GstElement *src, *capsfilter;
-static gint index = 0;
+static gint resolution_index = 0;
static gboolean
bus_callback (GstBus * bus, GstMessage * message, gpointer data)
@@ -88,16 +88,16 @@ change_caps (gpointer data)
GStrv res;
gchar *caps_str;
- if (!resolutions[index]) {
+ if (!resolutions[resolution_index]) {
gst_element_send_event (pipeline, gst_event_new_eos ());
return FALSE;
}
- g_print ("Setting resolution to '%s'\n", resolutions[index]);
+ g_print ("Setting resolution to '%s'\n", resolutions[resolution_index]);
- res = g_strsplit (resolutions[index++], "x", 2);
+ res = g_strsplit (resolutions[resolution_index++], "x", 2);
if (!res[0] || !res[1]) {
- g_warning ("Can't parse resolution: %s", resolutions[index - 1]);
+ g_warning ("Can't parse resolution: %s", resolutions[resolution_index - 1]);
g_strfreev (res);
return TRUE;
}