dashdemux: improve detection of stream language

Improved the detection of stream's language if the AdaptationSet
contains more than 1 ContentComponent

https://bugzilla.gnome.org/show_bug.cgi?id=752367
This commit is contained in:
Florin Apostol 2015-09-09 14:09:43 +01:00 committed by Vincent Penquerc'h
parent 7443f35249
commit e7745a5720

View file

@ -556,9 +556,16 @@ gst_dash_demux_setup_all_streams (GstDashDemux * demux)
lang = adp_set->lang;
/* Fallback to the language in ContentComponent node */
if (lang == NULL && g_list_length (adp_set->ContentComponents) == 1) {
GstContentComponentNode *cc_node = adp_set->ContentComponents->data;
if (lang == NULL) {
GList *it;
for (it = adp_set->ContentComponents; it; it = it->next) {
GstContentComponentNode *cc_node = it->data;
if (cc_node->lang) {
lang = cc_node->lang;
break;
}
}
}
}