Use correct clock when checking whether to write a new PCR

The PCR clocks against the 27MHz SCR clock, so check it correctly
to avoid writing the PCR too often.

Partially fixes: #611046
This commit is contained in:
Jan Schmidt 2011-03-26 16:12:18 +11:00
parent 9a26173a57
commit 5111540ceb

View file

@ -723,7 +723,7 @@ tsmux_write_stream_packet (TsMux * mux, TsMuxStream * stream)
/* Need to decide whether to write a new PCR in this packet */
if (stream->last_pcr == -1 ||
(cur_pcr - stream->last_pcr >
(TSMUX_CLOCK_FREQ / TSMUX_DEFAULT_PCR_FREQ))) {
(TSMUX_SYS_CLOCK_FREQ / TSMUX_DEFAULT_PCR_FREQ))) {
stream->pi.flags |=
TSMUX_PACKET_FLAG_ADAPTATION | TSMUX_PACKET_FLAG_WRITE_PCR;