decklink: Return new references to the devices from get_devices()

Otherwise the caller will free the devices we store internally.
This commit is contained in:
Sebastian Dröge 2019-12-05 21:22:18 +02:00
parent c28e7d928d
commit f776e2df96

View file

@ -1590,16 +1590,16 @@ gst_decklink_get_devices (void)
Device *device = (Device *) g_ptr_array_index (devices, i);
if (device->devices[0])
l = g_list_prepend (l, device->devices[0]);
l = g_list_prepend (l, g_object_ref (device->devices[0]));
if (device->devices[1])
l = g_list_prepend (l, device->devices[1]);
l = g_list_prepend (l, g_object_ref (device->devices[1]));
if (device->devices[2])
l = g_list_prepend (l, device->devices[2]);
l = g_list_prepend (l, g_object_ref (device->devices[2]));
if (device->devices[3])
l = g_list_prepend (l, device->devices[3]);
l = g_list_prepend (l, g_object_ref (device->devices[3]));
}
l = g_list_reverse (l);