hlssink3: Dont reset end_list after stop is called.

in current implementation EXT-X-ENDLIST is never set for any playlist-type.
After calling playlist.stop(), during write_final_playlist() is called.
in final playlist write, segment is not added but update_playlist is called.
and update_playlist reset end_list again, so plugin never put ENDLIST.
This commit is contained in:
Rajneesh Soni 2022-07-01 20:46:16 +05:30 committed by Arun Raghavan
parent 88bb91a5cb
commit 4ff2c8f1bc

View file

@ -59,6 +59,7 @@ impl Playlist {
/// Adds a new segment to the playlist.
pub fn add_segment(&mut self, uri: String, duration: f32) {
self.start();
self.inner.segments.push(MediaSegment {
uri,
duration,
@ -80,8 +81,6 @@ impl Playlist {
/// playlist length value. The playlist index and current media sequence is also kept up
/// to date.
pub fn update_playlist_state(&mut self, max_playlist_length: usize) {
self.start();
if !self.is_type_undefined() {
return;
}