[MPlayer-dev-eng] [PATCH] Proper seeking in PES files containing packets without PTS information

Christian Aistleitner zaek7q at gmx.net
Sun Jan 21 20:51:15 CET 2007


Hello,

when recording tv programme via szap and ts2pes, the resulting pes file  
typically has lots of packets _without_ pts information--which is ok, if  
the specification of pes I found is correct. When reading these packets,  
mplayer sets pts of that package to 0 and especially sets  
demuxer->priv->last_pts to 0 as well.

Setting demuxer->priv->last_pts to 0 gives troubles (at least) when  
performing relative seeks. Leaving demuxer->priv->last_pts unaltered for  
packets without pts solves the problem.
(See attached patch)

Additionally, in line 405 of libmpdemux/demux_mpg.c:

   ds_read_packet(ds,demux->stream,len,pts/90000.0f,demux->filepos,0);

pts is 0 for packets without pts information. Although this causes no  
problems for seeking, it looks ... potentially harmful.

Kind regards,
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: seekable-pes.diff
Type: application/octet-stream
Size: 1874 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070121/35cc68b6/attachment.obj>


More information about the MPlayer-dev-eng mailing list