summaryrefslogtreecommitdiff
path: root/ext/dash
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-07-08 16:31:48 +0300
committerSebastian Dröge <sebastian@centricular.com>2015-07-08 16:33:50 +0300
commita755fbb44021c84535d7f1ecd1ab85fdbb6b9afa (patch)
treea2861bcac8b88063305d054cd20477f80faa6e5e /ext/dash
parent34622c3961729dd6fbf386bec56afacdbfcb3f00 (diff)
downloadgstreamer-plugins-bad-a755fbb44021c84535d7f1ecd1ab85fdbb6b9afa.tar.gz
Revert "Revert "dashdemux: fixed gst_mpd_client_advance_segment to return GST_FLOW_EOS""
This reverts commit 4875ddf5855a26f349df7b385b68eb692e314bfa. This was based on a misunderstanding of the code. https://bugzilla.gnome.org/show_bug.cgi?id=752085
Diffstat (limited to 'ext/dash')
-rw-r--r--ext/dash/gstmpdparser.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c
index c331fdd17..879ef6bd2 100644
--- a/ext/dash/gstmpdparser.c
+++ b/ext/dash/gstmpdparser.c
@@ -3977,10 +3977,14 @@ gst_mpd_client_advance_segment (GstMpdClient * client, GstActiveStream * stream,
}
if (stream->segments == NULL) {
- if (stream->segment_index < 0)
+ if (stream->segment_index < 0) {
stream->segment_index = 0;
- else
+ } else {
stream->segment_index++;
+ if (segments_count > 0 && stream->segment_index >= segments_count) {
+ ret = GST_FLOW_EOS;
+ }
+ }
goto done;
}
@@ -4017,6 +4021,10 @@ gst_mpd_client_advance_segment (GstMpdClient * client, GstActiveStream * stream,
if (stream->segment_repeat_index >= segment->repeat) {
stream->segment_repeat_index = 0;
stream->segment_index++;
+ if (segments_count > 0 && stream->segment_index >= segments_count) {
+ ret = GST_FLOW_EOS;
+ goto done;
+ }
} else {
stream->segment_repeat_index++;
}
@@ -4024,6 +4032,7 @@ gst_mpd_client_advance_segment (GstMpdClient * client, GstActiveStream * stream,
if (stream->segment_repeat_index == 0) {
stream->segment_index--;
if (stream->segment_index < 0) {
+ ret = GST_FLOW_EOS;
goto done;
}