[Ffmpeg-devel] [Fwd: Is AVFrame->pts really set by libavcodec when decoding?]

Michael Niedermayer michaelni
Wed Apr 18 13:17:32 CEST 2007


Hi

On Wed, Apr 18, 2007 at 11:14:03AM +0200, Luca Abeni wrote:
> Hi all,
> 
> according to the documentation in avcodec.h, the pts field in AVFrame
> (defined in FF_COMMON_FRAME) is set by libavcodec when decoding.
> 
> But a simple test [*] showed that such field is not touched by
> libavcodec, or is set to 0 (depending on the codec), at least when
> decoding mpeg1/2 and raw video.
> 
> Is this a bug in libavcodec, a bug in the documentation, or something else?

AVFrame.pts is set to the pts which is stored in the stream, if the stream
does not store any PTS AVFrame.pts should be AV_NOPTS_VALUE

rawvideo amongth others does not contain any pts

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070418/a0431224/attachment.pgp>



More information about the ffmpeg-devel mailing list