mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
vkswapper: don't output duplicate formats
This commit is contained in:
parent
25dd3b32e5
commit
2d0cab20c0
1 changed files with 6 additions and 3 deletions
|
@ -156,17 +156,20 @@ static void
|
||||||
_add_vk_format_to_list (GValue * list, VkFormat format)
|
_add_vk_format_to_list (GValue * list, VkFormat format)
|
||||||
{
|
{
|
||||||
GstVideoFormat v_format;
|
GstVideoFormat v_format;
|
||||||
const gchar *format_str;
|
|
||||||
|
|
||||||
v_format = _vk_format_to_video_format (format);
|
v_format = _vk_format_to_video_format (format);
|
||||||
if (v_format) {
|
if (v_format) {
|
||||||
|
const gchar *format_str = gst_video_format_to_string (v_format);
|
||||||
GValue item = G_VALUE_INIT;
|
GValue item = G_VALUE_INIT;
|
||||||
|
GValue new_list = G_VALUE_INIT;
|
||||||
|
|
||||||
g_value_init (&item, G_TYPE_STRING);
|
g_value_init (&item, G_TYPE_STRING);
|
||||||
format_str = gst_video_format_to_string (v_format);
|
|
||||||
g_value_set_string (&item, format_str);
|
g_value_set_string (&item, format_str);
|
||||||
gst_value_list_append_value (list, &item);
|
gst_value_list_merge (&new_list, list, &item);
|
||||||
g_value_unset (&item);
|
g_value_unset (&item);
|
||||||
|
|
||||||
|
g_value_unset (list);
|
||||||
|
*list = new_list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue