Bug #3072
TVHeadend does not respond well to PMT updates in a running channel
0%
Description
It appears that when tvheadend detects a PMT update in the active stream it causes a drop in the stream to the playback device (seen as a minor buffering event on the client). However, when those PMT updates occur at around 1 per second, the playback pauses for constant buffering on the client. DVR operations also fail (so I did not think it was a client issue) and the problem occurs on 2 cards (ruling out a HW issue).
Running tvheadend in debugging mode while playing back the service/channel, the following message is seen for the one problem service (RTE2) on the 2RN 1 mux (I am served by ie-mullaghanish) at about a rate of 1 per second:
Sep 08 07:31:28.289 [ DEBUG] PSI: Service "DiBcom 7000PC 1/2RN 1: 474,000 kHz/RTÉ2" PMT (version 21) updated, Language changed, PIDs reordered
None of the other services on any other mux exhibit this. By disabling the handling of PMT updates on this service (SID=1102) while running, the problem goes away. The code is added around line 435 of psi.c:
if( (t->s_dvb_service_id 1102) && (t->s_status SERVICE_RUNNING) ) {
tvhlog(LOG_DEBUG, "PSI", "Rejected PMT update for running service RTE2");
return -1;
}
I suspect the PMT updates in this instance have no substantial affect on the running of the service and there are probably better ways to fix it but I am happy that this fixes the issue for me and that any PMT updates will be applied when the service is not running.
Given the age of the code base and the re-write in 4.0, I do not expect the issue to be fixed but just want to let others know in case they see it; searching the Internet, I found it is not known in the 3.x version but there was a fix for a similar issue ìn the 4.0 dvb_psi.c code (commit 9469ef0) that was disabled in a later update.
Paul
History
Updated by Jaroslav Kysela about 9 years ago
It's a known issue. I'm author of the (disabled) workaround, but I don't think that the workaround is correct. Basically, it's really unclear what to do with such wrong PMT updates where the broadcaster advertise two different PCRs..
#if 0 // FIXME, cannot be enabled in this form /* Ignore previous version */ /* This check is for the broken PMT tables where: * last 0 version 21 = PCR + Audio PID 0x0044 * last 0 version 22 = Audio PID 0x0044, PCR + Video PID 0x0045 */ if (*last == 0 && st->version - 1 == *ver) return -1; #endif
Updated by Paul Ryan about 9 years ago
Hi,
I have got tvheadend master branch running (i.e. 4.x) and no problems with the channel with the regular PMT updates (i.e. no code changes required).
Like I said, this was just submitted for the record in case someone else came across the issue. I am happy if you want to just close it off with a "fixed in version 4.x."
Thanks,
Paul
Updated by Jaroslav Kysela about 9 years ago
- Status changed from New to Fixed
OK. I overlooked that you're talking about the 3.6. If it works in 4.0 great. I'm closing this as fixed.