[vlc-devel] How to set PTS

Sheldon quyadong at hotmail.com
Tue Dec 13 02:04:38 CET 2011

Rafaël Carré <funman <at> videolan.org> writes:

> Le Mon, 12 Dec 2011 15:10:02 +0800,
> 曲亚东 <quyadong <at> hotmail.com> a écrit :
> > 
> > hi all,
> >  
> > Recently I try to write an access-demux module to parse h264 stream from a 
local camera. However,
> Runthread function can't get frame. I stepped into function decodeVideo in
> modules/codec/avcodec/video.c and found that picture have been dropped 
because p_sys->i_pts is 0. So I
> set 400000 to the first frame,  800000 to the second frame, ... and so on, 
but vlc just display the first frame
> and don't enter function demux and decodevideo again. I had read ts.c and 
found PCRHandle function to deal
> with the similar thing, but I can't understand how to transfer pts into 
decode or display. Would you like to
> give me some hint to deal with this issue? 
> try --demux avformat

It works. Thanks a lot.

More information about the vlc-devel mailing list