[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mythtv-dev
Subject:    Re: [mythtv] [mythtv-commits] [MythTV/mythtv] 035a52: No discontinuity for first TS packet of PID
From:       David Engel <david () istwok ! net>
Date:       2020-08-29 22:04:41
Message-ID: 20200829220441.GB1829190 () opus ! istwok ! net
[Download RAW message or body]

On Sat, Aug 29, 2020 at 11:27:01PM +0200, Klaas de Waal wrote:
> I do feel a bit silly. It looks like the only thing that needs to be done
> to fix the code is to initialize all elements of m_continuityCounter to
> 0xff. The function CheckCC in dtvrecorder.h does already test for value
> 0xff. In mythv version 30  a memset is used to set all elements of
> continuity_counter (as it was called then) to 0xff.
> Somewhere along the way the initialization must have been lost. To be
> continued.

That happens all to often with subtle code and developer churn.  I
have a saying I came up with several years ago after many times trying
to reconstruct the logic behind code that had seen many iterations.
It goes like this:

Every line of code had a reason for being at one time.  It might not
have been a good reason then, now or ever, but there was a reason.  If
you don't know what that reason was, be very careful removing or
modifying that code.

David
-- 
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic