mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-26 12:00:32 +00:00
fmp4: Use updated start_pts when checking stream filled
After calculating the earliest pts, the fragment_start_pts and chunk_start_pts in State are updated. However, when checking if the stream is filled, the previous start_pts (set to None) is used instead. This means that chunk_filled and fragment_filled will be false the first time aggregate() is called, assuming timeout is false, all_eos is false, and the sinkpad is not EOS. This requires aggregate() having to be called a second time before the first fragment is sent. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1207>
This commit is contained in:
parent
8b2b12e767
commit
cf21bfabf2
1 changed files with 3 additions and 3 deletions
|
@ -1117,9 +1117,6 @@ impl FMP4Mux {
|
|||
return;
|
||||
}
|
||||
|
||||
let fragment_start_pts = state.fragment_start_pts;
|
||||
let chunk_start_pts = state.chunk_start_pts;
|
||||
|
||||
// Calculate the earliest PTS after queueing input if we can now.
|
||||
let mut earliest_pts = None;
|
||||
let mut start_dts = None;
|
||||
|
@ -1228,6 +1225,9 @@ impl FMP4Mux {
|
|||
upstream_events.push((stream.sinkpad.clone(), fku));
|
||||
}
|
||||
|
||||
let fragment_start_pts = state.fragment_start_pts;
|
||||
let chunk_start_pts = state.chunk_start_pts;
|
||||
|
||||
// Check if any of the streams are already filled enough for the first chunk/fragment.
|
||||
for stream in &mut state.streams {
|
||||
self.check_stream_filled(
|
||||
|
|
Loading…
Reference in a new issue