matroskademux: Set subtitle tag title from TrackName field
authorPhilippe Normand <philn@igalia.com>
Wed, 13 Jun 2018 16:39:57 +0000 (17:39 +0100)
committerPhilippe Normand <philn@igalia.com>
Fri, 29 Jun 2018 16:11:28 +0000 (17:11 +0100)
GUI applications can then use the title tag to set menu items or labels
representing the track.

https://bugzilla.gnome.org/show_bug.cgi?id=796567

gst/matroska/matroska-demux.c

index 022f755..32d4598 100644 (file)
@@ -1430,6 +1430,11 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux, GstEbmlRead * ebml)
     lang = gst_tag_get_language_code (context->language);
     gst_tag_list_add (context->tags, GST_TAG_MERGE_REPLACE,
         GST_TAG_LANGUAGE_CODE, (lang) ? lang : context->language, NULL);
+
+    if (context->name) {
+      gst_tag_list_add (context->tags, GST_TAG_MERGE_REPLACE,
+          GST_TAG_TITLE, context->name, NULL);
+    }
     context->tags_changed = TRUE;
   }