diff options
author | Thiago Santos <thiagoss@osg.samsung.com> | 2014-08-19 16:01:58 -0300 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2014-08-19 16:02:52 -0300 |
commit | 4afa05e567272ef8084e8f82b89fb1e545e62ef1 (patch) | |
tree | aad65c4e5db900d200dc391e1da58e92d966ff14 | |
parent | 82fdb3aefcd2d2b642b97ced2d0475b39114a5ba (diff) |
dashdemux: read language from ContentComponent node as a fallback
If the language is not specified in the AdaptationSet, use the ContentComponent
node to get it. We only get it if there is only a single ContentComponent as
it doesn't seem clear on what to do if there are multiple entries
https://bugzilla.gnome.org/show_bug.cgi?id=732237
-rw-r--r-- | ext/dash/gstdashdemux.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c index b23a3a0e6..1aae5dd8f 100644 --- a/ext/dash/gstdashdemux.c +++ b/ext/dash/gstdashdemux.c @@ -753,7 +753,14 @@ gst_dash_demux_setup_all_streams (GstDashDemux * demux) gst_pad_push_event (stream->pad, gst_event_new_caps (caps)); if (active_stream->cur_adapt_set) { - lang = active_stream->cur_adapt_set->lang; + GstAdaptationSetNode *adp_set = active_stream->cur_adapt_set; + 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; + lang = cc_node->lang; + } } if (lang) { |