mpdparser: Fix off-by-one in has-next-segment calculation

This commit is contained in:
Sebastian Dröge 2015-07-07 19:25:28 +03:00
parent a78c1bdad5
commit 07d27d906a

View file

@ -3948,7 +3948,7 @@ gst_mpd_client_has_next_segment (GstMpdClient * client,
if (forward) { if (forward) {
guint segments_count = gst_mpd_client_get_segments_counts (client, stream); guint segments_count = gst_mpd_client_get_segments_counts (client, stream);
if (segments_count > 0 && stream->segment_index >= segments_count) if (segments_count > 0 && stream->segment_index + 1 >= segments_count)
return FALSE; return FALSE;
} else { } else {
if (stream->segment_index < 0) if (stream->segment_index < 0)