From 0ba65a00c93ff0c6ba938ee6326eb7f256c57f15 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Wed, 20 Jan 2021 11:33:39 +0100 Subject: [PATCH] matroska: Treat non-image structure as attachment Otherwise each structure is named as GstTagImageInfo even if it does not contain any images which is misleading. Part-of: --- subprojects/gst-plugins-good/gst/matroska/matroska-read-common.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-good/gst/matroska/matroska-read-common.c b/subprojects/gst-plugins-good/gst/matroska/matroska-read-common.c index 062044f..d83ca12 100644 --- a/subprojects/gst-plugins-good/gst/matroska/matroska-read-common.c +++ b/subprojects/gst-plugins-good/gst/matroska/matroska-read-common.c @@ -851,9 +851,11 @@ gst_matroska_read_common_parse_attached_file (GstMatroskaReadCommon * common, } /* Set filename and description in the info */ - if (info == NULL) - info = gst_structure_new_empty ("GstTagImageInfo"); - + if (info == NULL) { + const gchar *structure_name = (image_type != GST_TAG_IMAGE_TYPE_NONE) ? + "GstTagImageInfo" : "GstTagAttachmentInfo"; + info = gst_structure_new_empty (structure_name); + } gst_structure_set (info, "filename", G_TYPE_STRING, filename, NULL); if (description) gst_structure_set (info, "description", G_TYPE_STRING, description, NULL); -- 2.7.4