mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-26 05:21:00 +00:00
hlssink3: Don't remove old files if max-files is zero
Follow hlssink2 element's behavior Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1306>
This commit is contained in:
parent
a8d67cc607
commit
8e4863e9cd
1 changed files with 1 additions and 1 deletions
|
@ -353,7 +353,7 @@ impl HlsSink3 {
|
||||||
gst::StateChangeError
|
gst::StateChangeError
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
if state.playlist.is_type_undefined() {
|
if state.playlist.is_type_undefined() && max_num_segments > 0 {
|
||||||
// Cleanup old segments from filesystem
|
// Cleanup old segments from filesystem
|
||||||
if state.old_segment_locations.len() > max_num_segments {
|
if state.old_segment_locations.len() > max_num_segments {
|
||||||
for _ in 0..state.old_segment_locations.len() - max_num_segments {
|
for _ in 0..state.old_segment_locations.len() - max_num_segments {
|
||||||
|
|
Loading…
Reference in a new issue