[mythtv] This piece of code is driving me nuts!

Roger James roger at beardandsandals.co.uk
Sat Nov 19 13:10:27 UTC 2016


On 19 November 2016 11:00:14 am mythtv at phipps-hutton.freeserve.co.uk wrote:

>
> Quoting Roger James <roger at beardandsandals.co.uk>:
>
>> Doh!!!! My bad. I misread the std::vector docs. The first resize
>> will always be smaller than the second, and the second only
>> initialises the ones it adds. I am an idiot!
>>
> No you're not an idiot but I bet you wish there was a comment in the
> code to have explained what was the intention of the code was.
>
> Comments are good, they help people that are not you.
>
> Cheers,
> Tim.
>
>
Tim,

Too true. This is a classic example. This code is in mpegstreamdata.cpp 
where it works fine in that context. But it has been referenced from 
dvbstreamdata.cpp where it will not work for any DVB tables that use more 
data than just that contained in the tableid_extension to uniquely identify 
subtables, or where the table uses a segmented syntax such as the DVB EIT 
schedule table. This is why redundancy checking is so fundamentally broken 
in DVB. The daft  thing is that the only reason that DVB EIT works here in 
the UK is because it is broken in such a way that cancels out UK DTT use of 
 a single original network identifier for what in dvb terms are different 
original networks.

I have fixed that in my DVB EIT rework. But I will split the fix out for 
submission before I finish the EIT work. It may well be needed in the ATSC 
code as well. It certainly reduces the number of duplicate packets bring 
sent to the EIT code.

Roger

Roger




More information about the mythtv-dev mailing list