splitmuxsink: Split fragment only if queued time is larger than threshold

The queued time includes the duration of the last queued frame
(i.e., new keyframe) so the condition check should not be inclusive.
Note that the new fragment will be cut excluding the last frame
and therefore if the condition is inclusive way,
the fragment might have one frame shorter duration for all keyframe
stream such as jpeg or all-inter video streams.
This commit is contained in:
Seungha Yang 2020-03-25 21:20:07 +09:00
parent 6256fc67e4
commit a40eacabb4

View file

@ -2082,7 +2082,7 @@ need_new_fragment (GstSplitMuxSink * splitmux,
/* 5us possible rounding error was already accounted around keyframe request */
if (splitmux->threshold_timecode != GST_CLOCK_TIME_NONE &&
(queued_time >= splitmux->threshold_timecode)) {
(queued_time > splitmux->threshold_timecode)) {
GST_TRACE_OBJECT (splitmux, "Splitting at timecode mark");
return TRUE; /* Timecode threshold */
}