Commit 74c23f0f authored by Sebastian Dröge's avatar Sebastian Dröge 🍵
Browse files

videomixer: Create hashtable only when we actually use it

In error cases we previously returned without freeing it.
parent d3a2b3c7
......@@ -308,7 +308,7 @@ gst_videomixer2_update_converters (GstVideoMixer2 * mix)
GstCaps *possible_caps;
gchar *best_colorimetry;
const gchar *best_chroma;
GHashTable *formats_table = g_hash_table_new (g_direct_hash, g_direct_equal);
GHashTable *formats_table;
gint best_format_number = 0;
......@@ -319,6 +319,8 @@ gst_videomixer2_update_converters (GstVideoMixer2 * mix)
if (!downstream_caps || gst_caps_is_empty (downstream_caps))
return FALSE;
formats_table = g_hash_table_new (g_direct_hash, g_direct_equal);
/* first find new preferred format */
for (tmp = mix->sinkpads; tmp; tmp = tmp->next) {
GstStructure *s;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment