[mythtv] [mythtv-commits] mythtv commit: r8606 by ghaushe

Daniel Kristjansson danielk at cuymedia.net
Sat Jan 14 18:21:12 UTC 2006


On Sat, 2006-01-14 at 17:32 +0000, mythtv at cvs.mythtv.org wrote:
>       Author: ghaushe
>         Date: 2006-01-14 17:32:29 +0000 (Sat, 14 Jan 2006)
> New Revision: 8606
>    Changeset: http://cvs.mythtv.org/trac/changeset/8606
> 
> Modified:
> 
>    trunk/mythtv/libs/libavformat/mpegts.c
> 
> Log:
> 
> This resets the stream to the beginning after the 'get_packet_size' call in mpegts_read_header.  I have some strange TS streams where only the 1st PAT is ok, so it is necesary to search from the beginning to find it.  This seek exists in ffmpeg CVS, so I assume it was accidently removed when the SDT scan was removed.  I can't see how it could hurt anything otherwise.

This is probably a safe change, but why is it needed? Shouldn't whatever
function moved us past the 0 position bring us back (probably the stream
type detection)? What if we were reading from a device handle or
streaming from a remote backend, how would this seek be handled?

This whole function is completely unsafe anyway because it assumes that
the PAT and PMT are never change. If a you have a PMT at pos 0 and a new
PAT at pos 2000, this function will use the PMT at pos 0 rather than a
PMT following the PAT so that the initial stream info will be completely
bogus (because of that seek after the PAT scan). With MythTV this is
mostly not a problem because the recorders clean up the raw streams, but
this is still a problem with the Firewire and DBOX2 recorders.

-- Daniel



More information about the mythtv-dev mailing list