decklink: do not repeat first video format in caps template
authorJosep Torra <n770galaxy@gmail.com>
Wed, 22 Apr 2015 15:04:25 +0000 (17:04 +0200)
committerJosep Torra <n770galaxy@gmail.com>
Wed, 22 Apr 2015 15:20:21 +0000 (17:20 +0200)
The first entry in the modes array is used as default mode for autodetection.
There's no need to copy it into the caps template.

sys/decklink/gstdecklink.cpp

index 7335ab3..a5ccc22 100644 (file)
@@ -350,7 +350,7 @@ gst_decklink_mode_get_template_caps (void)
   GstStructure *s;
 
   caps = gst_caps_new_empty ();
-  for (i = 0; i < (int) G_N_ELEMENTS (modes); i++) {
+  for (i = 1; i < (int) G_N_ELEMENTS (modes); i++) {
     s = gst_decklink_mode_get_structure ((GstDecklinkModeEnum) i);
     gst_caps_append_structure (caps, s);
   }