From 5111540ceb04fbbfdb01b2c64911e04dbae291a8 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sat, 26 Mar 2011 16:12:18 +1100 Subject: [PATCH] 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 --- gst/mpegtsmux/tsmux/tsmux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/mpegtsmux/tsmux/tsmux.c b/gst/mpegtsmux/tsmux/tsmux.c index 1a50e72246..e160197029 100644 --- a/gst/mpegtsmux/tsmux/tsmux.c +++ b/gst/mpegtsmux/tsmux/tsmux.c @@ -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;