mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-18 12:15:19 +00:00
splitmuxsink: Only update max in/out running time if it's actually bigger
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1005>
This commit is contained in:
parent
68683d15c4
commit
eed843eea0
1 changed files with 10 additions and 3 deletions
|
@ -1344,7 +1344,12 @@ complete_or_wait_on_out (GstSplitMuxSink * splitmux, MqStreamCtx * ctx)
|
||||||
GST_STIME_ARGS (cmd->max_output_ts));
|
GST_STIME_ARGS (cmd->max_output_ts));
|
||||||
|
|
||||||
/* Extend the output range immediately */
|
/* Extend the output range immediately */
|
||||||
|
if (splitmux->max_out_running_time == GST_CLOCK_STIME_NONE
|
||||||
|
|| cmd->max_output_ts > splitmux->max_out_running_time)
|
||||||
splitmux->max_out_running_time = cmd->max_output_ts;
|
splitmux->max_out_running_time = cmd->max_output_ts;
|
||||||
|
GST_DEBUG_OBJECT (splitmux,
|
||||||
|
"Max out running time now %" GST_STIME_FORMAT,
|
||||||
|
GST_STIME_ARGS (splitmux->max_out_running_time));
|
||||||
splitmux->output_state = SPLITMUX_OUTPUT_STATE_OUTPUT_GOP;
|
splitmux->output_state = SPLITMUX_OUTPUT_STATE_OUTPUT_GOP;
|
||||||
}
|
}
|
||||||
GST_SPLITMUX_BROADCAST_OUTPUT (splitmux);
|
GST_SPLITMUX_BROADCAST_OUTPUT (splitmux);
|
||||||
|
@ -2856,6 +2861,7 @@ handle_mq_input (GstPad * pad, GstPadProbeInfo * info, MqStreamCtx * ctx)
|
||||||
|
|
||||||
if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT)) {
|
if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT)) {
|
||||||
/* Allow other input pads to catch up to here too */
|
/* Allow other input pads to catch up to here too */
|
||||||
|
if (ctx->in_running_time > splitmux->max_in_running_time)
|
||||||
splitmux->max_in_running_time = ctx->in_running_time;
|
splitmux->max_in_running_time = ctx->in_running_time;
|
||||||
GST_LOG_OBJECT (splitmux,
|
GST_LOG_OBJECT (splitmux,
|
||||||
"Max in running time now %" GST_TIME_FORMAT,
|
"Max in running time now %" GST_TIME_FORMAT,
|
||||||
|
@ -2868,6 +2874,7 @@ handle_mq_input (GstPad * pad, GstPadProbeInfo * info, MqStreamCtx * ctx)
|
||||||
GST_STIME_ARGS (ctx->in_running_time));
|
GST_STIME_ARGS (ctx->in_running_time));
|
||||||
keyframe = TRUE;
|
keyframe = TRUE;
|
||||||
splitmux->input_state = SPLITMUX_INPUT_STATE_WAITING_GOP_COLLECT;
|
splitmux->input_state = SPLITMUX_INPUT_STATE_WAITING_GOP_COLLECT;
|
||||||
|
if (ctx->in_running_time > splitmux->max_in_running_time)
|
||||||
splitmux->max_in_running_time = ctx->in_running_time;
|
splitmux->max_in_running_time = ctx->in_running_time;
|
||||||
GST_LOG_OBJECT (splitmux, "Max in running time now %" GST_TIME_FORMAT,
|
GST_LOG_OBJECT (splitmux, "Max in running time now %" GST_TIME_FORMAT,
|
||||||
GST_TIME_ARGS (splitmux->max_in_running_time));
|
GST_TIME_ARGS (splitmux->max_in_running_time));
|
||||||
|
|
Loading…
Reference in a new issue