mpegtsmux: Start last_ts with GST_CLOCK_TIME_NONE
authorJan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
Mon, 7 Mar 2022 17:46:55 +0000 (18:46 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 8 Mar 2022 10:57:44 +0000 (10:57 +0000)
commit95ff949eff70d5fd9f84e3f7e9546f03d91106f1
tree604538c4984f0349379c66da37f9c6706170375c
parente5dbf86a548a5eb382dc8985c7536fc8ec7f55bf
mpegtsmux: Start last_ts with GST_CLOCK_TIME_NONE

And use the output segment position for the outgoing timestamp while it
is. This is needed to delay the calculation of `output_ts_offset` until
we actually have a usable timestamp, as tsmux will output a few initial
packets while `last_ts` is still unset.

Without this, the calculation would use the initial `0` value, which did
not have the intended effect of making VBR mode behave like CBR mode,
but always calculated an offset equal to the selected start time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1884>
subprojects/gst-plugins-bad/gst/mpegtsmux/gstbasetsmux.c