Teletext subtitles not parsed correctly. (1 Viewer)

te3hpurp

Retired Team Member
  • Premium Supporter
  • September 23, 2008
    904
    231
    Rovaniemi
    Finland Finland
    Country flag
    Hi all.

    I came a cross a situation by accident. I have thought that one of my channels have no subtitles. Dvb or Teletext.
    On one day I started tvSetup and runned that channel with manual control and viewed it with vlc player, I was suprices that
    there was teletext subtitles. Mediaportal has never showed them, so I started to do some digging and came to see in mediaportal.log
    these lines:
    [2017-09-22 13:52:59,155] [Log ] [MPMain ] [INFO ] - Prefered language 1 is fin
    [2017-09-22 13:52:59,160] [Log ] [MPMain ] [INFO ] - Prefered language 2 is swe
    [2017-09-22 13:52:59,165] [Log ] [MPMain ] [INFO ] - Prefered language 3 is eng
    [2017-09-22 13:52:59,190] [Log ] [MPMain ] [INFO ] - TSReaderPlayer:GetVideoSize() failed
    [2017-09-22 13:52:59,195] [Log ] [MPMain ] [INFO ] - TSReaderPlayer:VideoSize:100x100
    [2017-09-22 13:52:59,267] [Error ] [9 ] [ERROR] - Assertion failed in PESDecoder: PESDECODER: pos 186 would cause an IndexOutOfBounds exception!
    [2017-09-22 13:52:59,277] [Log ] [9 ] [WARN ] - PESDECODER: Buffer is not empty, but new packet is being received!
    [2017-09-22 13:52:59,282] [Error ] [9 ] [ERROR] - Assertion failed in PESDecoder: PESDECODER: pos 186 would cause an IndexOutOfBounds exception!
    [2017-09-22 13:52:59,292] [Log ] [9 ] [WARN ] - PESDECODER: Buffer is not empty, but new packet is being received!

    Vlc player plays them fine. screen Capture is from same dump that i have made for this report.

    Br,
     

    Attachments

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,219
    New Zealand New Zealand
    Country flag
    Hello

    I can see the problem in the code. Unfortunately I can no longer build a patch for you to try. :(

    MediaPortal-1/PESDecoder.cs at master · MediaPortal/MediaPortal-1 · GitHub

    Current code:
    Code:
            assert(pos >= 0 && pos <= tsPacket.Length - 8, "PESDECODER: pos " + pos + " would cause an IndexOutOfBounds exception!");
    
            if (header.PayloadUnitStart) // if this header starts a new PES packet
            {
              //Log.Debug("PESDECODER: PayLoadUnitStart");
              hasPayloadStart = true;
              if (tsPacket[pos + 0] == 0 && tsPacket[pos + 1] == 0 && tsPacket[pos + 2] == 1)
              {
                int streamId = tsPacket[pos + 3];
    Better code:
    Code:
            if (header.PayloadUnitStart) // if this header starts a new PES packet
            {
              assert(pos >= 0 && pos <= tsPacket.Length - 3, "PESDECODER: pos " + pos + " would cause an IndexOutOfBounds exception!");
              //Log.Debug("PESDECODER: PayLoadUnitStart");
              hasPayloadStart = true;
              if (tsPacket[pos + 0] == 0 && tsPacket[pos + 1] == 0 && tsPacket[pos + 2] == 1)
              {
                assert(pos >= 0 && pos <= tsPacket.Length - 9, "PESDECODER: pos " + pos + " would cause an IndexOutOfBounds exception!");
                int streamId = tsPacket[pos + 3];
     

    te3hpurp

    Retired Team Member
  • Premium Supporter
  • September 23, 2008
    904
    231
    Rovaniemi
    Finland Finland
    Country flag
    I just built and tested.

    The changes work out of the box.

    This should go into Jira & git as a Fix

    thank you very very much !!!!

    Br,
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    S [fixed] [MP2-611] Teletext subtitles language selection 2.2 Archive 20
    S Australia live TV teletext subtitle General 4
    R [solved] MP2 Client ist extrem langsam Allgemeines Support- und Diskussionsforum 5
    mickb Subtitles My TVSeries 9
    M.Hulot Blu-ray: Es werden nicht nur Forced Subtitles angezeigt Allgemeines Supportforum 1
    J How to change y position of subtitles General 3
    R [will not fix] [MP2-832] MP2.2.2 subtitles not shown for WTV files Submit: Bug Reports 7
    S Remote button to change audio and subtitle on / off General 10
    P [solved] ATSC subtitles not fixed yet? General 2
    E Swedish subtitles problem General 2
    ratata Someone stole my subtitles... General Support 0
    Dark Eyes Display subtitles on a separate display or device MediaPortal 1 Plugins 0
    R [solved] Command / Shortcut for changing subtitles or audio Archive 5
    K Multichannel audio and subtitles for TV not properly supported General Support 4
    S Display non english folder name, subtitle, etc. General 23
    S [solved] Movie SRT subtitle didn't display on client 2.2 Archive 18
    S [solved] Live TV subtitle issue if not using 100% font General 31
    D [solved] How to configure subtitle color in MP 2.2.1? General 5
    G [fixed] [MP2-611] Having problems with subtitles (ATSC) 2.2 Archive 14
    LeeKelly Error parsing action result document and error starttimeshift General 2
    U Parsing invalid episode names My TVSeries 10
    Top Bottom