mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
mpegtsmux: apply some more CLOCK_BASE to ensure slack for PCR offset
Conflicts: gst/mpegtsmux/tsmux/tsmux.c
This commit is contained in:
parent
ba87a4524f
commit
c4b480b993
1 changed files with 4 additions and 3 deletions
|
@ -763,11 +763,12 @@ tsmux_write_stream_packet (TsMux * mux, TsMuxStream * stream)
|
||||||
|
|
||||||
/* FIXME: The current PCR needs more careful calculation than just
|
/* FIXME: The current PCR needs more careful calculation than just
|
||||||
* writing a fixed offset */
|
* writing a fixed offset */
|
||||||
if (cur_pts != -1 && (cur_pts >= TSMUX_PCR_OFFSET))
|
if (cur_pts != -1) {
|
||||||
|
/* CLOCK_BASE >= TSMUX_PCR_OFFSET */
|
||||||
|
cur_pts += CLOCK_BASE;
|
||||||
cur_pcr = (cur_pts - TSMUX_PCR_OFFSET) *
|
cur_pcr = (cur_pts - TSMUX_PCR_OFFSET) *
|
||||||
(TSMUX_SYS_CLOCK_FREQ / TSMUX_CLOCK_FREQ);
|
(TSMUX_SYS_CLOCK_FREQ / TSMUX_CLOCK_FREQ);
|
||||||
|
}
|
||||||
cur_pcr += (gint64) CLOCK_BASE *(TSMUX_SYS_CLOCK_FREQ / TSMUX_CLOCK_FREQ);
|
|
||||||
|
|
||||||
/* Need to decide whether to write a new PCR in this packet */
|
/* Need to decide whether to write a new PCR in this packet */
|
||||||
if (stream->last_pcr == -1 ||
|
if (stream->last_pcr == -1 ||
|
||||||
|
|
Loading…
Reference in a new issue