Skip to content

queue: queue2: multiqueue: Don't work with segment.position if buffers have no timestamps

Sebastian Dröge requested to merge slomo/gstreamer:queue-clock-time-none into main

If the first buffers have no timestamp then the sink position would be initialized to 0. The source pad might output this buffer, which would then initialize the source position to 0 too.

Afterwards two buffers with a valid but huge timestamp might arrive before any of them are output on the source pad. The first one would set the sink position to a huge value, the second one would notice that the difference between the huge value and 0 is certainly larger than max-size-time and consider the queue as full.

Instead, simply don't update the times from buffers without timestamps and assume whatever was set before is still valid, i.e. the buffer has the same timestamp as the previous one.

Merge request reports

Loading