switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_TAG:{
GstTagList *tags = NULL;
-
- event =
- GST_EVENT (gst_mini_object_make_writable (GST_MINI_OBJECT (event)));
+ const GstStructure *s;
gst_event_parse_tag (event, &tags);
+ tags = gst_tag_list_copy (tags);
+ s = gst_event_get_structure (event);
+
+ gst_event_take (&event, gst_event_new_tag (gst_structure_get_name (s),
+ tags));
+
/* drop codec/video-codec and replace encoder/encoder-version */
gst_tag_list_remove_tag (tags, GST_TAG_VIDEO_CODEC);
gst_tag_list_remove_tag (tags, GST_TAG_CODEC);