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/1387>
This commit is contained in:
Seungha Yang 2023-08-31 19:57:33 +09:00 committed by Sebastian Dröge
parent 98b104dc7b
commit 9e46f6c411

View file

@ -334,7 +334,7 @@ impl HlsSink3 {
gst::StateChangeError
})?;
if state.playlist.is_type_undefined() {
if state.playlist.is_type_undefined() && max_num_segments > 0 {
// Cleanup old segments from filesystem
if state.old_segment_locations.len() > max_num_segments {
for _ in 0..state.old_segment_locations.len() - max_num_segments {