Fix race in rendering final manifest
This commit is contained in:
parent
798fff1772
commit
e76ec06420
1 changed files with 15 additions and 13 deletions
28
src/imp.rs
28
src/imp.rs
|
@ -612,19 +612,21 @@ impl ElementImpl for FlexHlsSink {
|
||||||
match transition {
|
match transition {
|
||||||
gst::StateChange::PausedToReady => {
|
gst::StateChange::PausedToReady => {
|
||||||
// Turning down
|
// Turning down
|
||||||
let mut state = self.state.lock().unwrap();
|
let write_final = {
|
||||||
let write_final = match &mut *state {
|
let mut state = self.state.lock().unwrap();
|
||||||
State::Stopped => false,
|
match &mut *state {
|
||||||
State::Started {
|
State::Stopped => false,
|
||||||
playlist,
|
State::Started {
|
||||||
playlist_render_state,
|
playlist,
|
||||||
..
|
playlist_render_state,
|
||||||
} => {
|
..
|
||||||
if *playlist_render_state == PlaylistRenderState::Started {
|
} => {
|
||||||
playlist.end_list = true;
|
if *playlist_render_state == PlaylistRenderState::Started {
|
||||||
true
|
playlist.end_list = true;
|
||||||
} else {
|
true
|
||||||
false
|
} else {
|
||||||
|
false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue