diff --git a/tests/check/elements/dash_mpd.c b/tests/check/elements/dash_mpd.c
index d074862e2f..3dc72e390a 100644
--- a/tests/check/elements/dash_mpd.c
+++ b/tests/check/elements/dash_mpd.c
@@ -1980,6 +1980,141 @@ GST_START_TEST (dash_mpdparser_period_adaptationSet_segmentTemplate)
GST_END_TEST;
+GST_START_TEST
+ (dash_mpdparser_period_adaptationSet_representation_segmentTemplate_inherit)
+{
+ GstPeriodNode *periodNode;
+ GstAdaptationSetNode *adaptationSet;
+ GstRepresentationNode *representation;
+ GstSegmentTemplateNode *segmentTemplate;
+ const gchar *xml =
+ ""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " ";
+
+ gboolean ret;
+ GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+ ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+ assert_equals_int (ret, TRUE);
+
+ periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+ adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+ representation =
+ (GstRepresentationNode *) adaptationSet->Representations->data;
+ segmentTemplate = representation->SegmentTemplate;
+ assert_equals_string (segmentTemplate->media, "TestMedia");
+ assert_equals_string (segmentTemplate->index, "TestIndex");
+ assert_equals_string (segmentTemplate->initialization,
+ "ParentInitialization");
+ assert_equals_string (segmentTemplate->bitstreamSwitching,
+ "TestBitstreamSwitching");
+
+ gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+GST_START_TEST
+ (dash_mpdparser_period_adaptationSet_representation_segmentBase_inherit) {
+ GstPeriodNode *periodNode;
+ GstAdaptationSetNode *adaptationSet;
+ GstRepresentationNode *representation;
+ GstSegmentBaseType *segmentBase;
+ const gchar *xml =
+ ""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " "
+ " ";
+
+ gboolean ret;
+ GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+ ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+ assert_equals_int (ret, TRUE);
+
+ periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+ adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+ representation =
+ (GstRepresentationNode *) adaptationSet->Representations->data;
+ segmentBase = representation->SegmentBase;
+ assert_equals_int (segmentBase->timescale, 123456);
+
+ gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
+
+/*
+ * Test parsing Period AdaptationSet SegmentTemplate attributes with
+ * inheritance
+ */
+GST_START_TEST (dash_mpdparser_adapt_repr_segmentTemplate_inherit)
+{
+ GstPeriodNode *periodNode;
+ GstAdaptationSetNode *adaptationSet;
+ GstSegmentTemplateNode *segmentTemplate;
+ GstRepresentationNode *representation;
+ GstMultSegmentBaseType *multSegBaseType;
+ GstSegmentBaseType *segBaseType;
+ const gchar *xml =
+ ""
+ ""
+ " "
+ " "
+ " "
+ " "
+ " "
+ " ";
+
+ gboolean ret;
+ GstMpdClient *mpdclient = gst_mpd_client_new ();
+
+ ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml));
+ assert_equals_int (ret, TRUE);
+
+ periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data;
+ adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data;
+ representation = (GstRepresentationNode *)
+ adaptationSet->Representations->data;
+ segmentTemplate = representation->SegmentTemplate;
+ fail_if (segmentTemplate == NULL);
+ multSegBaseType = segmentTemplate->MultSegBaseType;
+ segBaseType = multSegBaseType->SegBaseType;
+
+ assert_equals_uint64 (segBaseType->timescale, 12800);
+ assert_equals_uint64 (multSegBaseType->duration, 25600);
+ assert_equals_uint64 (multSegBaseType->startNumber, 1);
+ assert_equals_string (segmentTemplate->media, "track1_$Number$.m4s");
+ assert_equals_string (segmentTemplate->initialization, "set1_init.mp4");
+
+ gst_mpd_client_free (mpdclient);
+}
+
+GST_END_TEST;
/*
* Test parsing Period AdaptationSet SegmentTemplate attributes with
* inheritance
@@ -5697,6 +5832,8 @@ dash_suite (void)
dash_mpdparser_period_adaptationSet_representationBase);
tcase_add_test (tc_simpleMPD,
dash_mpdparser_period_adaptationSet_representationBase_framePacking);
+ tcase_add_test (tc_simpleMPD,
+ dash_mpdparser_adapt_repr_segmentTemplate_inherit);
tcase_add_test (tc_simpleMPD,
dash_mpdparser_period_adaptationSet_representationBase_audioChannelConfiguration);
tcase_add_test (tc_simpleMPD,
@@ -5748,6 +5885,10 @@ dash_suite (void)
dash_mpdparser_period_adaptationSet_representation_segmentList);
tcase_add_test (tc_simpleMPD,
dash_mpdparser_period_adaptationSet_representation_segmentTemplate);
+ tcase_add_test (tc_simpleMPD,
+ dash_mpdparser_period_adaptationSet_representation_segmentTemplate_inherit);
+ tcase_add_test (tc_simpleMPD,
+ dash_mpdparser_period_adaptationSet_representation_segmentBase_inherit);
tcase_add_test (tc_simpleMPD, dash_mpdparser_period_subset);
tcase_add_test (tc_simpleMPD, dash_mpdparser_utctiming);
tcase_add_test (tc_simpleMPD, dash_mpdparser_utctiming_invalid_value);