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.
GstStructure *s;
caps = gst_caps_new_empty ();
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);
}
s = gst_decklink_mode_get_structure ((GstDecklinkModeEnum) i);
gst_caps_append_structure (caps, s);
}