diff --git a/ges/ges-pitivi-formatter.c b/ges/ges-pitivi-formatter.c index 47cef555da..5bc6b8d724 100644 --- a/ges/ges-pitivi-formatter.c +++ b/ges/ges-pitivi-formatter.c @@ -476,7 +476,7 @@ make_source (GESFormatter * self, GList * reflist, GHashTable * source_table) layer = ges_layer_new (); g_object_set (layer, "auto-transition", TRUE, "priority", prio, NULL); ges_timeline_add_layer (self->timeline, layer); - g_hash_table_insert (priv->layers_table, g_memdup (&prio, + g_hash_table_insert (priv->layers_table, g_memdup2 (&prio, sizeof (guint64)), layer); } diff --git a/meson.build b/meson.build index a5df86ade2..7fdb1a290a 100644 --- a/meson.build +++ b/meson.build @@ -322,6 +322,10 @@ if gst_version_nano == 0 endif endif +if gio_dep.version().version_compare('< 2.67.4') + cdata.set('g_memdup2(ptr,sz)', '(G_LIKELY(((guint64)(sz)) < G_MAXUINT)) ? g_memdup(ptr,sz) : (g_abort(),NULL)') +endif + configure_file(output: 'config.h', configuration: cdata) run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')