summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungha Yang <sh.yang@lge.com>2017-03-27 10:06:30 +0900
committerThiago Santos <thiagossantos@gmail.com>2017-04-15 18:33:41 -0700
commit6167dab39ee0f8c683f0ab840ceaa005780cfa5e (patch)
tree4983124bbe1c1cf36ac9b1410b44b226a17d383e
parente00be2758528eb4ddb326efe4c261ce3b776a6e5 (diff)
downloadgstreamer-plugins-bad-6167dab39ee0f8c683f0ab840ceaa005780cfa5e.tar.gz
mpdparser: Allow inherit Segment{Base,Template} from Period
Similar to SegmentList, Representation can inherit Segment{Base,Template} from Period https://bugzilla.gnome.org/show_bug.cgi?id=780570
-rw-r--r--ext/dash/gstmpdparser.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c
index 41212abae..33340a498 100644
--- a/ext/dash/gstmpdparser.c
+++ b/ext/dash/gstmpdparser.c
@@ -1896,11 +1896,13 @@ gst_mpdparser_parse_representation_node (GList ** list, xmlNode * a_node,
if (cur_node->type == XML_ELEMENT_NODE) {
if (xmlStrcmp (cur_node->name, (xmlChar *) "SegmentBase") == 0) {
gst_mpdparser_parse_seg_base_type_ext (&new_representation->SegmentBase,
- cur_node, parent->SegmentBase);
+ cur_node, parent->SegmentBase ?
+ parent->SegmentBase : period_node->SegmentBase);
} else if (xmlStrcmp (cur_node->name, (xmlChar *) "SegmentTemplate") == 0) {
if (!gst_mpdparser_parse_segment_template_node
(&new_representation->SegmentTemplate, cur_node,
- parent->SegmentTemplate))
+ parent->SegmentTemplate ?
+ parent->SegmentTemplate : period_node->SegmentTemplate))
goto error;
} else if (xmlStrcmp (cur_node->name, (xmlChar *) "SegmentList") == 0) {
if (!gst_mpdparser_parse_segment_list_node