From 8e4863e9cd0033733eb4a4b0fdf9fcb15ac79e24 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Thu, 31 Aug 2023 19:57:33 +0900 Subject: [PATCH] hlssink3: Don't remove old files if max-files is zero Follow hlssink2 element's behavior Part-of: --- net/hlssink3/src/imp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/hlssink3/src/imp.rs b/net/hlssink3/src/imp.rs index 770fbacd..1d5b40bf 100644 --- a/net/hlssink3/src/imp.rs +++ b/net/hlssink3/src/imp.rs @@ -353,7 +353,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 {