mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-18 20:25:25 +00:00
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
This commit is contained in:
parent
cc599bb5b5
commit
cfe2871a5e
1 changed files with 10 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue