diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2019-05-22 18:06:04 +0300 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-08-07 20:40:08 +0100 |
commit | 0f5dc763630491cf72ae2689628e4b2a8aeb418e (patch) | |
tree | 1fb991cf5bfc7c8fe85f84ad0b396f3cc294d139 /gst | |
parent | 0d77e9721deea47256cf800db58bf119f3c53786 (diff) |
splitmuxsink: Only set running time on finalizing sink element when in async-finalize mode
There is only a single sink element in async-finalize mode, and we would
keep the running time from previous fragments set in that case. As we
don't ever set the running time for the very last fragment on EOS, this
would mean that the closing time reported for the very last fragment is
the same as the closing time of the previous fragment.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/multifile/gstsplitmuxsink.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gst/multifile/gstsplitmuxsink.c b/gst/multifile/gstsplitmuxsink.c index 0cbe54188..7a91e9bf6 100644 --- a/gst/multifile/gstsplitmuxsink.c +++ b/gst/multifile/gstsplitmuxsink.c @@ -2027,10 +2027,12 @@ handle_gathered_gop (GstSplitMuxSink * splitmux) /* Check for overrun - have we output at least one byte and overrun * either threshold? */ if (need_new_fragment (splitmux, queued_time, queued_gop_time, queued_bytes)) { - GstClockTime *sink_running_time = g_new (GstClockTime, 1); - *sink_running_time = splitmux->reference_ctx->out_running_time; - g_object_set_qdata_full (G_OBJECT (splitmux->sink), - RUNNING_TIME, sink_running_time, g_free); + if (splitmux->async_finalize) { + GstClockTime *sink_running_time = g_new (GstClockTime, 1); + *sink_running_time = splitmux->reference_ctx->out_running_time; + g_object_set_qdata_full (G_OBJECT (splitmux->sink), + RUNNING_TIME, sink_running_time, g_free); + } g_atomic_int_set (&(splitmux->do_split_next_gop), FALSE); /* Tell the output side to start a new fragment */ GST_INFO_OBJECT (splitmux, |