Uploaded image for project: 'MediaPortal 1'
  1. MediaPortal 1
  2. MP1-3043

TsReader problems with PCR rollover

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.3.0 Alpha
    • 1.2.0 Beta
    • TsReader
    • None
    • Operating System: Windows 7
      Platform: Intel

    Description

      The handling of PCR rollover in TsReader is incorrect in some cases. Quote from Asselin (who raised the issue originally):

      "TsReader has 2 bugs in it when dealing with TS files that have PCR rollover:
      1. When you start playback, MediaPortal freezes, HDD light goes solid, and after a while (could be minutes), the file starts playing back.
      2. While playing, if you try to skip forward or backward, the HDD light goes solid again, and then after a while, the recording restarts from the beginning.

      Problem MP1-1 is a bug in TsDuration. It calculates the duration of the TS file by looking for the max PCR in the TS file before the rollover happens, and does this by a sequential (!) backwards (!!) file search. All that is unnecessary-- the code should just use a constant value (the MAX possible PCR of all binary 1s) as the value.

      Problem MP1-2 is a bug in TsFileSeek. Here, there's a section of code specifically for scanning a TS file with PCR rollover in it, and there's an if() statement where the logic is backwards. Fixing the if() fixes the problem, but beyond that, there's a whole other algorithm in it to deal with skipping around in TS files with PCR rollover that is unnecessary. The standard binary search algorithm works just fine, and is in fact faster."

      h4. Steps to Reproduce
      TS files from MP TVserver do not normally trigger the problems, because PCR always starts from zero for each new file (and rollover takes ~26 hrs).

      Users have reported problems with files recorded by FTR Argus and MythTV (which presumably just record the broadcast PCR into the TS file)

      h4. Additional Information
      TsReader patch file here - http://forum.team-mediaportal.com/762164-post6.html

      Attachments

        Activity

          People

            Owlsroost Owlsroost (Inactive)
            Owlsroost Owlsroost (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: