Open Jalle19 opened 1 year ago
@catalinii I'm testing https://github.com/Jalle19/minisatip/commit/0e4877fdcfda66ce68d90b96fdb3433a0327b5a9, mostly a shot in the dark.
Could you explain the idea behind "master PMT"? I haven't really figured it out. The header says "the pmt that contains the same pids as this PMT", but what does that mean? Is it a reference to the adapter PMT in the context of the DDCI PMT?
I checked my logs for the month of March, and there's not a single case where pmt->id != pmt->master_pmt
:
negge@vladimir:~$ journalctl -u minisatip --since 2023-03-01 | grep -i pmt | grep master | grep -v ' CW ' > master_pmt.txt
negge@vladimir:~$ head master_pmt.txt
Mar 15 22:53:47 vladimir minisatip[104924]: [15/03 22:53:47.911 AD7]: deleting PMT 263, master PMT 263, name SVT2 HD
Mar 15 22:53:47 vladimir minisatip[104924]: [15/03 22:53:47.911 AD7]: deleting PMT 277, master PMT 277, name V sport
Mar 15 22:53:47 vladimir minisatip[104924]: [15/03 22:53:47.911 AD7]: deleting PMT 278, master PMT 278, name Viasat
Mar 15 23:02:06 vladimir minisatip[104924]: [15/03 23:02:06.281 AD6]: deleting PMT 254, master PMT 254, name V sport
Mar 15 23:02:06 vladimir minisatip[104924]: [15/03 23:02:06.281 AD6]: deleting PMT 266, master PMT 266, name V film
Mar 15 23:02:06 vladimir minisatip[104924]: [15/03 23:02:06.281 AD6]: deleting PMT 272, master PMT 272, name
Mar 15 23:02:06 vladimir minisatip[104924]: [15/03 23:02:06.281 AD6]: deleting PMT 273, master PMT 273, name V sport
Mar 15 23:02:06 vladimir minisatip[104924]: [15/03 23:02:06.281 AD6]: deleting PMT 274, master PMT 274, name V sport
Mar 15 23:02:06 vladimir minisatip[104924]: [15/03 23:02:06.281 AD6]: deleting PMT 275, master PMT 275, name V sport
Mar 15 23:02:06 vladimir minisatip[104924]: [15/03 23:02:06.281 AD6]: deleting PMT 276, master PMT 276, name V sport
negge@vladimir:~$ cat master_pmt.txt | awk '{if ($11!=$14) {print $11 $14}}'
negge@vladimir:~$
Now that I think about it, if master PMT is never different from the PMT being processed, by "fix" does nothing. The code it removes does nothing either, but it doens't fix anything.
Got it to happen again!
I've been trying to track down a bug that occurs after a few days of runtime only. The issue manifests as decryption issues for a pair of channels, and I think the channels have to be on the same mux for this to occur.
The gist is that after some time, the DDCI adapter's virtual PMT will end up including CA PIDs from two different services, when it should only contain the one for the service actually being played, e.g.:
In the above example, PID 4120 is the only CA PID actually available for the service. PID 4114 belongs to another service on the same mux.
When it works as expected, only PID 4120 should even be mentioned:
I've unfortunately haven't been able to reliably reproduce this since restarting minisatip fixes the issue at least temporarily. I've been trying to figure out in what situations the PMT could be left "stale" and include old CA PIDs, but so far no luck.
Leaving this here in case someone has experienced the same thing and has some pointers.