mpegtsmux: Improve PCR/SI scheduling.
authorJan Schmidt <jan@centricular.com>
Thu, 11 Mar 2021 07:05:25 +0000 (18:05 +1100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 18 Mar 2021 13:57:27 +0000 (13:57 +0000)
commit3201575d2a522018f14040dc787009945e468814
tree7b271350b8ec9eace8847a1b18319cb18bb8cc50
parent49c61338d62acf6d12605090813f1029f473ebf7
mpegtsmux: Improve PCR/SI scheduling.

Change PCR / SI scheduling so that instead of checking if
the current PCR is larger than the next target time, instead
check if the PCR of the next packet would be too late, so PCR
and SI are always scheduled earlier than the target, not later.

There are still cases where PCR can be written too late though,
because we don't check before each output packet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2073>
gst/mpegtsmux/tsmux/tsmux.c