mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
gstclapper: Make tags writable before insert
Someone might be holding a copied media info in which case tag list ref count is not 1. Use gst_tag_list_make_writable to assure that ref count is 1, so we can insert more tags into the list.
This commit is contained in:
6
lib/gst/clapper/gstclapper.c
vendored
6
lib/gst/clapper/gstclapper.c
vendored
@@ -1868,10 +1868,12 @@ media_info_update (GstClapper * self, GstClapperMediaInfo * info)
|
||||
static void
|
||||
merge_tags (GstTagList **my_tags, GstTagList *tags)
|
||||
{
|
||||
if (*my_tags)
|
||||
if (*my_tags) {
|
||||
*my_tags = gst_tag_list_make_writable (*my_tags);
|
||||
gst_tag_list_insert (*my_tags, tags, GST_TAG_MERGE_REPLACE);
|
||||
else
|
||||
} else {
|
||||
*my_tags = gst_tag_list_ref (tags);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user