GNOME Bugzilla – Bug 611046
mpegtsmux: pcr problems
Last modified: 2011-10-29 15:42:15 UTC
1. wrong frequency gst-plugins-bad-0.10.12/gst/mpegtsmux/tsmux/tsmux.c if (stream->last_pcr == -1 || (cur_pcr - stream->last_pcr > (TSMUX_CLOCK_FREQ / TSMUX_DEFAULT_PCR_FREQ))) { Since pcr runs in clock TSMUX_SYS_CLOCK_FREQ, the comparison should be if (stream->last_pcr == -1 || (cur_pcr - stream->last_pcr > (TSMUX_SYS_CLOCK_FREQ / TSMUX_DEFAULT_PCR_FREQ))) { 2. imprecise pcr gst-plugins-bad-0.10.12/gst/mpegtsmux/tsmux/tsmux.c cur_pcr = (cur_pts - TSMUX_PCR_OFFSET) * (TSMUX_SYS_CLOCK_FREQ / TSMUX_CLOCK_FREQ); This makes pcr a multiple of TSMUX_SYS_CLOCK_FREQ / TSMUX_CLOCK_FREQ (=300), which makes pcr_ext always 0 in pcr_ext = (pi->pcr % 300); pcr should be generated from gsttime instead of mpegtime which has a low precision after GSTTIME_TO_MPEGTIME.
you should update your comments based on the git version, some clock issues have been fixed recently (that 300x issue)
The clock issues fixed are about pat/pmt frequency not pcr. This issue is for HEAD in git, which version is 0.10.17.3 pre-release.
I pushed this patch, which fixes the incorrect PCR insertion rate: commit 5111540ceb04fbbfdb01b2c64911e04dbae291a8 Author: Jan Schmidt <thaytan@noraisin.net> Date: Sat Mar 26 16:12:18 2011 +1100 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 Making the PCR more accurate requires a bit more work to pass the extra GstClockTime granularity down into the tsmux library.
Isn't this bug fixed ?
Let's assume it is. If not, please reopen.