[mythtv-commits] Ticket #7827: PSIP MultipleStringStructure incorrectly parsed for segment count > 1

MythTV mythtv at cvs.mythtv.org
Wed Dec 30 05:04:51 UTC 2009


#7827: PSIP MultipleStringStructure incorrectly parsed for segment count > 1
-------------------------------+--------------------------------------------
 Reporter:  seanano@…          |       Owner:  danielk
     Type:  defect             |      Status:  new    
 Priority:  minor              |   Milestone:  unknown
Component:  MythTV - ATSC      |     Version:  head   
 Severity:  low                |     Mlocked:  0      
-------------------------------+--------------------------------------------
 When a string in the PSIP MultipleStringStructure contains multiple
 segments, the segments after the first are not parsed correctly.  This can
 manifest itself in many ways, I saw it as 1 or more "MSS unknown text
 compression XXX" strings appearing in the end of the guide information for
 a program when it had a lot of text (using EIT scanning for guide on OTA
 ATSC).  The XXX of the first occurrence was always the 3rd to last byte of
 the previous segment.

 I believe the problem lies in atscdescriptors.cpp.  At line 170 (in
 MultipleStringStructure::Parse), the pointer for the next segment is
 determined.  It is calculated as the pointer for the current segment plus
 the size of the data bytes.  However, this does not take into account the
 3 bytes of data for each segment that are prior to the data bytes (defined
 as compression_type, mode, and number_bytes in section 6.10 of A65
 standard).  Each segment pointer would therefore be off -3*j bytes.

 It seems the appropriate fix would be changing line 170 from this:

 _ptrs[Index(i,j+1)] = Offset(i,j) + Bytes(i,j);

 to the following:

 _ptrs[Index(i,j+1)] = Offset(i,j) + 3 + Bytes(i,j);

 This change is consistent with MultipleStringStructure::GetSegment in the
 same file which calculates the segment's data bytes start offset as
 Offset(i,j) + 3.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/7827>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list