mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
Read Matroska Title element for the TITLE tag
Not all Matroska files have a Tags element which contains information about the title among other things. Most video Matroska files only contain the Title element so we should parse this too. Fixes bug #570435.
This commit is contained in:
parent
d3d7c89d48
commit
7353cdc029
1 changed files with 15 additions and 1 deletions
|
@ -2743,6 +2743,21 @@ gst_matroska_demux_parse_info (GstMatroskaDemux * demux)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case GST_MATROSKA_ID_TITLE:{
|
||||||
|
gchar *text;
|
||||||
|
GstTagList *taglist;
|
||||||
|
|
||||||
|
if ((ret = gst_ebml_read_utf8 (ebml, &id, &text)) != GST_FLOW_OK)
|
||||||
|
break;
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (demux, "Title: %s", GST_STR_NULL (text));
|
||||||
|
taglist = gst_tag_list_new ();
|
||||||
|
gst_tag_list_add (taglist, GST_TAG_MERGE_APPEND, GST_TAG_TITLE, text,
|
||||||
|
NULL);
|
||||||
|
gst_element_found_tags (GST_ELEMENT (ebml), taglist);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
GST_WARNING_OBJECT (demux,
|
GST_WARNING_OBJECT (demux,
|
||||||
"Unknown SegmentInfo subelement 0x%x - ignoring", id);
|
"Unknown SegmentInfo subelement 0x%x - ignoring", id);
|
||||||
|
@ -2754,7 +2769,6 @@ gst_matroska_demux_parse_info (GstMatroskaDemux * demux)
|
||||||
case GST_MATROSKA_ID_PREVFILENAME:
|
case GST_MATROSKA_ID_PREVFILENAME:
|
||||||
case GST_MATROSKA_ID_NEXTUID:
|
case GST_MATROSKA_ID_NEXTUID:
|
||||||
case GST_MATROSKA_ID_NEXTFILENAME:
|
case GST_MATROSKA_ID_NEXTFILENAME:
|
||||||
case GST_MATROSKA_ID_TITLE:
|
|
||||||
case GST_MATROSKA_ID_SEGMENTFAMILY:
|
case GST_MATROSKA_ID_SEGMENTFAMILY:
|
||||||
case GST_MATROSKA_ID_CHAPTERTRANSLATE:
|
case GST_MATROSKA_ID_CHAPTERTRANSLATE:
|
||||||
ret = gst_ebml_read_skip (ebml);
|
ret = gst_ebml_read_skip (ebml);
|
||||||
|
|
Loading…
Reference in a new issue