[mythtv] [mythtv-commits] [MythTV/mythtv] cf8015: No discontinuity for first TS packet of PID

David Engel david at istwok.net
Sat Aug 29 19:42:44 UTC 2020

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

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.

David Engel
david at istwok.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: continuity.patch
Type: text/x-diff
Size: 2449 bytes
Desc: not available
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20200829/48986cb2/attachment.bin>

More information about the mythtv-dev mailing list