[mythtv] [mythtv-commits] [MythTV/mythtv] cf8015: No discontinuity for first TS packet of PID
Klaas de Waal
klaas.de.waal at gmail.com
Sat Aug 29 20:52:16 UTC 2020
On Sat, 29 Aug 2020 at 21:43, David Engel <david at istwok.net> wrote:
> On Sat, Aug 29, 2020 at 07:36:37AM -0700, kmdewaal wrote:
> > Branch: refs/heads/master
> > Home: https://github.com/MythTV/mythtv
> > Commit: cf8015eaf4a2fde6ece423e7ade99c86f7f9d076
> >
> https://github.com/MythTV/mythtv/commit/cf8015eaf4a2fde6ece423e7ade99c86f7f9d076
> > Author: Klaas de Waal <kdewaal at mythtv.org>
> > Date: 2020-08-29 (Sat, 29 Aug 2020)
> >
> > Changed paths:
> > M mythtv/libs/libmythtv/recorders/dtvrecorder.cpp
> > M mythtv/libs/libmythtv/recorders/dtvrecorder.h
> >
> > Log Message:
> > -----------
> > No discontinuity for first TS packet of PID
> >
> > Do not count the discontinuity from 0 to the continuity counter value of
> the first transport stream
> > packet of a PID as an error and consequently do also not give a
> "discontinuity detected" error message.
> > A perfect recording will now report a continuity_error_count of 0
> instead of approximately the number of PIDs in the recording.
>
> By sheer coincidence, I've been debugging an issue with my setup and
> have been watching for continuity errors. I was lamenting the fact
> that there were often false positives reported every time a recording
> starts when I saw you committed this change. I see one problem with
> the change, though. 1/16th of the time, the first counter seen will
> actually be 0, which is the inital value in m_continuityCounter. When
> that happens, reporting of the first, real discontinuity will be
> suppressed.
>
> I believe the attached patch fixes that issue by initializing
> m_continuityCounter to an impossible value. That will always cause an
> initial continuity that can be safely ignored. All continuity errors
> after that will be real and can be reported.
>
>
> Hi David,
Your analysis that 1/16th of the time the first real error is suppressed is
of course correct.
I do appreciate your patch but it does need initialisation of all elements
of m_continuityCounter to 0xff, not only the first element.
This can be done by calling m_continuityCounter.fill(0xff) in the
constructor, I cannot find a way to do this in the header file.
I am testing this now and will commit it later.
Thanks,
Klaas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20200829/e1d88e50/attachment.htm>
More information about the mythtv-dev
mailing list