Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mux
diff options
context:
space:
mode:
Diffstat (limited to 'mux')
-rw-r--r--mux/fmp4/src/fmp4mux/imp.rs17
1 files changed, 16 insertions, 1 deletions
diff --git a/mux/fmp4/src/fmp4mux/imp.rs b/mux/fmp4/src/fmp4mux/imp.rs
index 08c39d1be..38e48dd07 100644
--- a/mux/fmp4/src/fmp4mux/imp.rs
+++ b/mux/fmp4/src/fmp4mux/imp.rs
@@ -2928,7 +2928,22 @@ impl ElementImpl for FMP4Mux {
impl AggregatorImpl for FMP4Mux {
fn next_time(&self) -> Option<gst::ClockTime> {
let state = self.state.lock().unwrap();
- state.chunk_start_pts.opt_add(state.timeout_delay)
+ let agg = self.obj();
+ let segment = agg
+ .src_pad()
+ .segment()
+ .downcast::<gst::ClockTime>()
+ .expect("TIME segment");
+
+ state
+ .chunk_start_pts
+ .opt_add(state.timeout_delay)
+ .and_then(|mut t| {
+ if !agg.class().as_ref().variant.is_single_stream() {
+ t += SEGMENT_OFFSET;
+ }
+ segment.to_running_time(t)
+ })
}
fn sink_query(