videomixer: change sink pad template name from sink_%d to sink_%u
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 1 May 2012 17:58:03 +0000 (18:58 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 1 May 2012 17:58:03 +0000 (18:58 +0100)
gst/videomixer/videomixer2.c
gst/videomixer/videomixer2.h

index 804b060..0d2d97e 100644 (file)
@@ -112,7 +112,7 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
     GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (FORMATS))
     );
 
-static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink_%d",
+static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink_%u",
     GST_PAD_SINK,
     GST_PAD_REQUEST,
     GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (FORMATS))
@@ -1754,8 +1754,8 @@ gst_videomixer2_request_new_pad (GstElement * element,
 
   mix = GST_VIDEO_MIXER2 (element);
 
-  if (templ == gst_element_class_get_pad_template (klass, "sink_%d")) {
-    gint serial = 0;
+  if (templ == gst_element_class_get_pad_template (klass, "sink_%u")) {
+    guint serial = 0;
     gchar *name = NULL;
     GstVideoMixer2Collect *mixcol = NULL;
 
@@ -1771,7 +1771,7 @@ gst_videomixer2_request_new_pad (GstElement * element,
         mix->next_sinkpad = serial + 1;
     }
     /* create new pad with the name */
-    name = g_strdup_printf ("sink_%d", serial);
+    name = g_strdup_printf ("sink_%u", serial);
     mixpad = g_object_new (GST_TYPE_VIDEO_MIXER2_PAD, "name", name, "direction",
         templ->direction, "template", templ, NULL);
     g_free (name);
index 5f4af2e..bc547fe 100644 (file)
@@ -83,7 +83,7 @@ struct _GstVideoMixer2
   GSList *sinkpads;
   gint numpads;
   /* Next available sinkpad index */
-  gint next_sinkpad;
+  guint next_sinkpad;
 
   /* Output caps */
   GstVideoInfo info;