<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">So I had a chance to test all the ATSC tables that are in libdvbpsi. I did make the change mentioned below to each table and attached a patch to this email.<div><br></div><div>I did find and issue with ETT parsing though. The function dvbpsi_atsc_DecodeETTSections causes a crash. It seems the memory for p_ett->p_etm_data is not being allocated. Also, the check for the p_ett->p_etm_data is wrong. It should be this:</div><div><br></div><div><div> if (!p_ett->p_etm_data)</div><div>            abort();</div></div><div><br></div><div>I tried malloc'ing the memory and correcting the pointer check. When I do that I get an abort from libc free saying double free or corruption. Here is the stack trace:</div><div><br></div><div><div>#0  0x0000003908e35935 in raise () from /lib64/libc.so.6</div><div>#1  0x0000003908e370e8 in abort () from /lib64/libc.so.6</div><div>#2  0x0000003908e74e8b in __libc_message () from /lib64/libc.so.6</div><div>#3  0x0000003908e7c00e in _int_free () from /lib64/libc.so.6</div><div>#4  0x00007ffff7ddca91 in dvbpsi_DeletePSISections (p_section=0x7fffe80008c0) at psi.c:179</div><div>#5  0x00007ffff7deb992 in dvbpsi_atsc_GatherETTSections (p_dvbpsi=0x7ffff00008c0, p_decoder=0x7fffe8001910, p_section=0x7fffe80008c0)</div><div>    at tables/atsc_ett.c:403</div><div>#6  0x00007ffff7ddd17e in dvbpsi_Demux (p_dvbpsi=0x7ffff00008c0, p_section=0x7fffe80008c0) at demux.c:123</div><div>#7  0x00007ffff7ddc31e in dvbpsi_packet_push (p_dvbpsi=0x7ffff00008c0, p_data=0x7ffff75b5dd0 "GR\a\031") at dvbpsi.c:445</div><div>#8  0x0000000000403cff in ATSCServices::demuxCallback (stream=0x7ffff75b5dd0 "GR\a\031", size=188, privateData=0x7fffffffde70, args=0x0)</div><div>    at ATSCServices.cpp:172</div><div>#9  0x00000000004021fb in DemuxInterface::run (context=0x609060) at DemuxInterface.cpp:106</div><div>#10 0x0000003909607d14 in start_thread () from /lib64/libpthread.so.0</div><div>#11 0x0000003908ef168d in clone () from /lib64/libc.so.6</div></div><div><br></div><div><br></div><div>I'm not sure where to go from here in trying to debug it. I'm not actually using EITs and ETTs so its not a problem for me but might be for someone else in the future.</div><div><br></div><div>I can send you a capture of ETT TS packets that you can test with if you want me to.</div><div><br></div><div>Thanks,</div><div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><div>Brad Bitterman</div><div><a href="mailto:bitter@vtilt.com">bitter@vtilt.com</a></div><div><br></div></span></div></div></body></html>