Bug #5676
EMM packets not being written to DDCI adapters
0%
Description
EMM packets are not being sent to DDCI adapters, causing entitlements to not be updated.
While dvbcam.c dvbcam_cat_update() does call mpegts_input_open_pid(mi, mux, MPS_SERVICE, ...) to open the EMM pid (logging "add EMM PID x (X) for CAID y"), it gets filtered in tsdemux.c ts_recv_packet1() by the line "if ((st == NULL) && (pid != t->s_components.set_pcr_pid) && !table)" before the descrambler_descramble() call (which actually would write the packet to the DDCI device).
st is NULL as the EMM pid is not in t->s_components which is managed by dvb_psi_pmt.c dvb_pmt_callback().
table is false as nothing has called mpegts_table_add() on the EMM pid (as tvheadend is not interested in the actual data contents).
I tried for several hours to figure out how this should be fixed properly, but gave up for now.
If you have any hints, I can try to fix this myself
Files
History
Updated by Anssi Hannula over 5 years ago
Attached is a workaround I applied locally.
Updated by Anssi Hannula over 5 years ago
Anssi Hannula wrote:
Attached is a workaround I applied locally.
Oops, that hits an assert on service reopen. Seemingly fixed workaround attached.
Updated by Jaroslav Kysela over 5 years ago
I don't remember why I duplicated this functionality. It seems that it might be enough to call modified (!assert) mpegts_input_open_cat_monitor() from the dvbcam_cat_update() and add the mpegts_input_close_pid() call to mpegts_input_cat_pass_callback() - it seems missing. Perhaps, it would be better to create mpegts_input_close_service_pid().