diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-09-14 19:03:10 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-09-14 19:49:14 +0200 |
commit | cfe2871a5e3c5b1db20470927642b776e055a87a (patch) | |
tree | 6b88b587e530c391fe2b6d46208918bd4685c81b | |
parent | cc599bb5b53e12c5a08b8c477341015d0699c76d (diff) | |
download | gstreamer-plugins-bad-cfe2871a5e3c5b1db20470927642b776e055a87a.tar.gz |
mpdparser: Consider the repeat count when checking if a segment is the last one
Otherwise we play only the first repetition of the last segment and then EOS.
https://bugzilla.gnome.org/show_bug.cgi?id=752480
-rw-r--r-- | ext/dash/gstmpdparser.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index c604c458c..ba0aa3388 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -3975,8 +3975,17 @@ gst_mpd_client_has_next_segment (GstMpdClient * client, if (forward) { guint segments_count = gst_mpd_client_get_segments_counts (client, stream); - if (segments_count > 0 && stream->segment_index + 1 >= segments_count) + if (segments_count > 0 && stream->segment_index + 1 == segments_count) { + GstMediaSegment *segment; + + segment = g_ptr_array_index (stream->segments, stream->segment_index); + if (segment->repeat >= 0 + && stream->segment_repeat_index >= segment->repeat) + return FALSE; + } else if (segments_count > 0 + && stream->segment_index + 1 >= segments_count) { return FALSE; + } } else { if (stream->segment_index < 0) return FALSE; |