[Ffmpeg-devel] [Fwd: Is AVFrame->pts really set by libavcodec when decoding?]
Wed Apr 18 14:51:03 CEST 2007
thanks for the reply.
Michael Niedermayer wrote:
>> 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
Ok, so there seems to be a bug both in mpeg1/2 and raw video handling
(when decoding mpeg pts is always set to 0, when decoding raw video it
is not changed).
If I find the time, I'll try to prepare a patch for this. Where should
the timestamp be set? (in the decoder, in the generic - util.c - code,
in the parser, or...?)
More information about the ffmpeg-devel