mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
qtdemux: fix up language code extraction some more
Quicktime uses ISO 639-2 for language codes, but GST_TAG_LANGUAGE is supposed to hold a ISO 639-1 code, so convert as needed using the new API from -base. See #602126.
This commit is contained in:
parent
b66f914586
commit
6c4c8f8670
1 changed files with 6 additions and 1 deletions
|
@ -5415,10 +5415,15 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
|
|||
/* add some language tag, if useful */
|
||||
if (stream->lang_code && strcmp (stream->lang_id, "unk") &&
|
||||
strcmp (stream->lang_id, "und")) {
|
||||
const gchar *lang_code;
|
||||
|
||||
if (!list)
|
||||
list = gst_tag_list_new ();
|
||||
|
||||
/* convert ISO 639-2 code to ISO 639-1 */
|
||||
lang_code = gst_tag_get_language_code (stream->lang_id);
|
||||
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
|
||||
GST_TAG_LANGUAGE_CODE, stream->lang_id, NULL);
|
||||
GST_TAG_LANGUAGE_CODE, (lang_code) ? lang_code : stream->lang_id, NULL);
|
||||
}
|
||||
|
||||
/* now we are ready to add the stream */
|
||||
|
|
Loading…
Reference in a new issue