[FFmpeg-devel] [EXTERNAL] Re: [PATCH] Extracting NTP timestamp from RTCP

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Nov 9 19:06:02 CET 2013


On Sat, Nov 09, 2013 at 10:58:25AM -0700, Fred Rothganger wrote:
> On 11/09/2013 03:50 AM, Michael Niedermayer wrote:
> >also, how do i test this ? it seems the field is just 0 when reading
> >a random rtsp stream
> >also if 0 means "Not set" then this should be documented
> >
> >
> 
> 0 does not mean "not set". It means January 1, 1970 at midnight
> (documented). It just happens to conveniently be the value that the
> field gets set to on initialization of AVFormatContext, and thus a
> good indicator (99.999%) that it is worth the effort to compute the
> value.

Well, according to that the documentation says that the first frames
were recorded on January 1, 1970.
That obviously is not true, and from the code it quite obvious that you
don't use 0 to mean January 1,1970 but it means unknown/not yet
found/...
That should be documented (and there is of course a question if it's
a good idea. INT64_MAX might be a better choice.


More information about the ffmpeg-devel mailing list