mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-09 18:55:27 +00:00
hlssink3: Don't remove uri from playlist if playlist-length is zero
Behave as documented in property description Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1306>
This commit is contained in:
parent
8e4863e9cd
commit
d8546dd140
1 changed files with 3 additions and 4 deletions
|
@ -96,10 +96,9 @@ impl Playlist {
|
|||
}
|
||||
|
||||
// Remove oldest segments if playlist is at maximum expected capacity
|
||||
if self.inner.segments.len() > max_playlist_length {
|
||||
for _ in 0..self.inner.segments.len() - max_playlist_length {
|
||||
let _ = self.inner.segments.remove(0);
|
||||
}
|
||||
if max_playlist_length > 0 && self.inner.segments.len() > max_playlist_length {
|
||||
let remove_len = self.inner.segments.len() - max_playlist_length;
|
||||
self.inner.segments.drain(0..remove_len);
|
||||
}
|
||||
|
||||
self.playlist_index += 1;
|
||||
|
|
Loading…
Reference in a new issue