mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
videomixer: Create hashtable only when we actually use it
In error cases we previously returned without freeing it.
This commit is contained in:
parent
d3a2b3c73a
commit
74c23f0f4f
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
||||
best_format = GST_VIDEO_FORMAT_UNKNOWN;
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue