[mythtv-commits] Ticket #9929: MPEGStreamData doesn't handle video packets without a payload

MythTV noreply at mythtv.org
Tue Jul 19 19:36:26 UTC 2011


#9929: MPEGStreamData doesn't handle video packets without a payload
-------------------------------------+-------------------------------------
 Reporter:  Ron Frazier <ron@…>      |           Type:  Bug Report -
   Status:  new                      |  General
Milestone:  unknown                  |       Priority:  minor
  Version:  0.24-fixes               |      Component:  MythTV - General
 Keywords:                           |       Severity:  medium
                                     |  Ticket locked:  0
-------------------------------------+-------------------------------------
 I found a bug in the MPEGStreamData class that causes problems with the
 mpeg data I get from my cable provider. It appears to be a simple
 programming error (starting a loop counter from 1 instead of 0).

 The data I get from my provider comes in the following format: [[BR]]
 PID 0 - PAT [[BR]]
 PID X - PMT [[BR]]
 PID X+1 - video data [[BR]]
 PID X+2 - audio data [[BR]]

 Packets often come through on PID X+1 containing an adaption field but no
 payload. The adaption field contains the PCR data.

 Since there is only 1 video packet and that loop starts from array index 1
 instead of 0, the video packet never gets added to the list of Writing
 PIDs. Then, when MPEGStreamData::ProcessTSPacket processes one of these
 packets, it doesn't actually have a payload and the video PID is not a
 writing PID, so the packet gets discarded.

 The resulting video appears to play fine in myth when there is a seek
 table, but without a seek table (like if you copy it to mythvideo) you
 cannot seek around in the file. Other players (VLC and Windows Media
 Player) refuse to play the file at all.

 I'm attaching a patch that fixes the issue for me. This patch was
 generated against 0.24-fixes, but the code appears to be the same in
 trunk.

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/9929>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list