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

Nico Sabbi nicola_sabbi at fastwebnet.it
Mon Jan 22 23:28:23 CET 2007


Christian Aistleitner wrote:
> 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)

good. committed, thanks

> 
> 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.

it should read MP_NOPTS_VALUE, but since demux_mpg doesn't work (yet, 
if ever) with -correct-pts 0 is the only sensible value to use

-- 
"Without a frontend, mplayer is useless" - someone in mplayer-users



More information about the MPlayer-dev-eng mailing list