hello,
from the valgrind output i could see following:
=139329== 2 errors in context 1 of 1:
==139329== Invalid read of size 4
==139329== at 0x399AD4: atomic_add (atomic.h:36)
==139329== by 0x399AD4: service_ref (service.c:615)
==139329== by 0x456E3D: dvb_bat_find_service.isra.0 (dvb_psi.c:557)
==139329== by 0x45937D: dvb_desc_service_list (dvb_psi.c:584)
==139329== by 0x45937D: dvb_nit_mux (dvb_psi.c:1337)
==139329== by 0x45A815: dvb_nit_callback (dvb_psi.c:1578)
==139329== by 0x45068D: mpegts_table_dispatch (mpegts_table.c:105)
==139329== by 0x446869: mpegts_psi_section_reassemble0 (dvb_psi_lib.c:135)
==139329== by 0x446C1D: mpegts_psi_section_reassemble (dvb_psi_lib.c:185)
==139329== by 0x43F839: mpegts_input_table_dispatch (mpegts_input.c:1339)
==139329== by 0x43FA74: mpegts_input_table_thread (mpegts_input.c:1814)
==139329== by 0x36D88D: thread_wrapper (tvh_thread.c:91)
==139329== by 0x56DCAA3: start_thread (pthread_create.c:447)
==139329== by 0x5769A33: clone (clone.S:100)
==139329== Address 0x84 is not stack'd, malloc'd or (recently) free'd
==139329==
==139329== ERROR SUMMARY: 2 errors from 1 contexts (suppressed: 0 from 0)
so i checked the file dvb_psi.c and modified it to the same error handling as it is used on other places where this funciton is called - so only on few other of such call's this error handling is missing as well - but i only changed it now here - new code looks like this:
/*
static int
dvb_desc_service_list2
( mpegts_table_t *mt, const uint8_t *ptr, int len, mpegts_mux_t *mm,
dvb_bat_id_t *bi )
{
uint16_t stype, sid;
mpegts_service_t *s;
int i;
for (i = 0; i < len; i += 3) {
sid = extract_svcid(ptr + i);
stype = ptr[i+2];
tvhdebug(mt->mt_subsys, "%s: service %04X (%d) type %02X (%d)", mt->mt_name, sid, sid, stype, stype);
if (mm) {
int save = 0;
s = mpegts_service_find(mm, sid, 0, 1, &save);
if (bi)
dvb_bat_find_service(bi, s, 0, UINT_MAX);
if (save)
idnode_changed(&s->s_id);
}
}
return 0;
}
*/
static int
dvb_desc_service_list
( mpegts_table_t *mt, const uint8_t *ptr, int len, mpegts_mux_t *mm,
dvb_bat_id_t *bi )
{
uint16_t stype, sid;
mpegts_service_t *s;
int i;
for (i = 0; i < len; i += 3) {
sid = extract_svcid(ptr + i);
stype = ptr[i+2];
tvhdebug(mt->mt_subsys, "%s: service %04X (%d) type %02X (%d)", mt->mt_name, sid, sid, stype, stype);
if (mm) {
int save = 0;
s = mpegts_service_find(mm, sid, 0, 1, &save);
if (s) {
if (bi)
dvb_bat_find_service(bi, s, 0, UINT_MAX);
if (save)
idnode_changed(&s->s_id);
}
}
}
return 0;
}
with this change no abort and all channels are found again on this transponder - at least the 3 i use - i can'T tell if there is one missing now - but ORF2 and ORF3 and ORF SPORT are now working for me again - there are still some other channels found as well but i don't use them.
maybe this can be changed / added to the code as well to avoid this kind of aborts - as the same error handling is used on other places in the code as well where this kind of function is used
thanks a lot for your time and help
holli
PS: i renamed the org. function to 'dvb_desc_service_list2' but the compile did not work - because of warning for unused function - that is the reason i commented it and it still says '2'...