From 5151c42085dacfa2c0f4df07d8e27db1036c91e8 Mon Sep 17 00:00:00 2001 From: Florin Apostol Date: Fri, 3 Jul 2015 16:10:20 +0100 Subject: [PATCH] dashdemux: corrected search for audio languages Corrected the initialisation of mimeType in gst_mpdparser_get_list_and_nb_of_audio_language: the variable is used in a loop, so it must be set to NULL at the beginning of each iteration. https://bugzilla.gnome.org/show_bug.cgi?id=751911 --- ext/dash/gstmpdparser.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index 14949e1911..366991bf6e 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -3538,7 +3538,7 @@ gst_mpd_client_setup_streaming (GstMpdClient * client, GST_DEBUG ("0. Current stream %p", stream); - /* retrive representation list */ + /* retrieve representation list */ if (stream->cur_adapt_set != NULL) rep_list = stream->cur_adapt_set->Representations; @@ -4474,11 +4474,12 @@ gst_mpdparser_get_list_and_nb_of_audio_language (GstMpdClient * client, for (list = g_list_first (stream_period->period->AdaptationSets); list; list = g_list_next (list)) { adapt_set = (GstAdaptationSetNode *) list->data; - if (adapt_set) { + if (adapt_set && adapt_set->lang) { gchar *this_lang = adapt_set->lang; GstRepresentationNode *rep; rep = gst_mpdparser_get_lowest_representation (adapt_set->Representations); + mimeType = NULL; if (rep->RepresentationBase) mimeType = rep->RepresentationBase->mimeType; if (!mimeType && adapt_set->RepresentationBase) { @@ -4486,10 +4487,8 @@ gst_mpdparser_get_list_and_nb_of_audio_language (GstMpdClient * client, } if (strncmp_ext (mimeType, this_mimeType) == 0) { - if (this_lang) { - nb_adaptation_set++; - *lang = g_list_append (*lang, this_lang); - } + nb_adaptation_set++; + *lang = g_list_append (*lang, this_lang); } } }