mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:06:17 +00:00
splitmux: Improve handling of repeated timestamps
When handling input with timestamps that repeat, sometimes splitmuxsink would get confused and ignore a keyframe. The logic in question is a holdover from before the cmd queue moved the file cutting to the multiqueue output side and made it deterministic, so it's no longer needed on the input here. https://bugzilla.gnome.org/show_bug.cgi?id=796773
This commit is contained in:
parent
f667ab05d2
commit
f672116c72
1 changed files with 13 additions and 6 deletions
|
@ -2277,14 +2277,19 @@ handle_mq_input (GstPad * pad, GstPadProbeInfo * info, MqStreamCtx * ctx)
|
||||||
switch (splitmux->input_state) {
|
switch (splitmux->input_state) {
|
||||||
case SPLITMUX_INPUT_STATE_COLLECTING_GOP_START:
|
case SPLITMUX_INPUT_STATE_COLLECTING_GOP_START:
|
||||||
if (ctx->is_reference) {
|
if (ctx->is_reference) {
|
||||||
/* If a keyframe, we have a complete GOP */
|
/* This is the reference context. If it's a keyframe,
|
||||||
if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT) ||
|
* it marks the start of a new GOP and we should wait in
|
||||||
!GST_CLOCK_STIME_IS_VALID (ctx->in_running_time) ||
|
* check_completed_gop before continuing, but either way
|
||||||
splitmux->max_in_running_time >= ctx->in_running_time) {
|
* (keyframe or no, we'll pass this buffer through after
|
||||||
/* Pass this buffer through */
|
* so set loop_again to FALSE */
|
||||||
loop_again = FALSE;
|
loop_again = FALSE;
|
||||||
|
|
||||||
|
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 */
|
||||||
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_TIME_ARGS (splitmux->max_in_running_time));
|
||||||
GST_SPLITMUX_BROADCAST_INPUT (splitmux);
|
GST_SPLITMUX_BROADCAST_INPUT (splitmux);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2294,6 +2299,8 @@ handle_mq_input (GstPad * pad, GstPadProbeInfo * info, MqStreamCtx * ctx)
|
||||||
keyframe = TRUE;
|
keyframe = TRUE;
|
||||||
splitmux->input_state = SPLITMUX_INPUT_STATE_WAITING_GOP_COLLECT;
|
splitmux->input_state = SPLITMUX_INPUT_STATE_WAITING_GOP_COLLECT;
|
||||||
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_TIME_ARGS (splitmux->max_in_running_time));
|
||||||
/* Wake up other input pads to collect this GOP */
|
/* Wake up other input pads to collect this GOP */
|
||||||
GST_SPLITMUX_BROADCAST_INPUT (splitmux);
|
GST_SPLITMUX_BROADCAST_INPUT (splitmux);
|
||||||
check_completed_gop (splitmux, ctx);
|
check_completed_gop (splitmux, ctx);
|
||||||
|
|
Loading…
Reference in a new issue