Project

General

Profile

Bug #5676

EMM packets not being written to DDCI adapters

Added by Anssi Hannula 14 days ago. Updated 14 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Descrambling
Target version:
-
Start date:
2019-07-06
Due date:
% Done:

0%

Estimated time:
Found in version:
master / 6bfeca6c03db
Affected Versions:

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

ddci-emm-workaround.patch (981 Bytes) ddci-emm-workaround.patch Workaround for the issue Anssi Hannula, 2019-07-06 19:29
ddci-emm-workaround.patch (993 Bytes) ddci-emm-workaround.patch Workaround for the issue, v2 Anssi Hannula, 2019-07-06 19:38

History

#1

Updated by Anssi Hannula 14 days ago

Attached is a workaround I applied locally.

#2

Updated by Anssi Hannula 14 days ago

Anssi Hannula wrote:

Attached is a workaround I applied locally.

Oops, that hits an assert on service reopen. Seemingly fixed workaround attached.

#3

Updated by Jaroslav Kysela 14 days 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().

Also available in: Atom PDF