summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorFlorin Apostol <florin.apostol@oregan.net>2015-07-06 14:14:12 +0100
committerSebastian Dröge <sebastian@centricular.com>2015-07-07 13:30:07 +0300
commitdfe37ffc59fdf5f4075696976d98ec8d6db73138 (patch)
tree8d157e3c5d7deb632af54a091b856c9bf19901ab /ext
parent7f44ee05147a8a07282cf21622e44761548fc098 (diff)
downloadgstreamer-plugins-bad-dfe37ffc59fdf5f4075696976d98ec8d6db73138.tar.gz
dashdemux: fixed gst_mpd_client_advance_segment to return GST_FLOW_EOS
Fixed gst_mpd_client_advance_segment to return GST_FLOW_EOS if the new index is out of range. https://bugzilla.gnome.org/show_bug.cgi?id=751850
Diffstat (limited to 'ext')
-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 abaa12409..add782464 100644
--- a/ext/dash/gstmpdparser.c
+++ b/ext/dash/gstmpdparser.c
@@ -3975,10 +3975,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;
}
@@ -4015,6 +4019,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++;
}
@@ -4022,6 +4030,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;
}