mxfmux: Add all local tags to the primer

No matter if they're allocated via GSlice or malloc(). The allocator is
completely irrelevant, all local tags need to be in the primer so they
can be handled.

This didn't have any effect in practice because all local tags that
appear in the muxer are allocated via GSlice. Only from the demuxer they
might be allocated via malloc().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3699>
This commit is contained in:
Sebastian Dröge 2023-01-09 12:39:55 +02:00 committed by GStreamer Marge Bot
parent d43ee08f13
commit bd91768692

View file

@ -246,10 +246,10 @@ mxf_metadata_base_to_buffer (MXFMetadataBase * self, MXFPrimerPack * primer)
g_hash_table_iter_init (&iter, self->other_tags);
while (g_hash_table_iter_next (&iter, NULL, (gpointer) & t)) {
mxf_primer_pack_add_mapping (primer, 0x0000, &t->ul);
tmp = g_slice_dup (MXFLocalTag, t);
if (t->g_slice) {
tmp->data = g_slice_alloc (t->size);
mxf_primer_pack_add_mapping (primer, 0x0000, &t->ul);
memcpy (tmp->data, t->data, t->size);
} else {
tmp->data = g_memdup2 (t->data, t->size);