[FFmpeg-devel] Fix NTP time in RTCP SR packets

Michael Niedermayer michaelni
Wed Feb 20 12:27:25 CET 2008


On Wed, Feb 20, 2008 at 11:47:38AM +0100, Reimar D?ffinger wrote:
> Hello,
> On Mon, Feb 18, 2008 at 09:51:25PM +0100, Michael Niedermayer wrote:
> > On Mon, Feb 18, 2008 at 08:56:07PM +0100, Reimar D?ffinger wrote:
> > > Nevertheless, the
> > > specification does not really require this information, 
> > 
> > The part quoted said:
> > "A sender that has no notion of wallclock or elapsed time may set the NTP
> > timestamp to zero."
> > 
> > ffmpeg as a POSIX program, has a notion of wallclock and elapsed time thus
> > this statement does not really apply. It just says if you dont know X you
> > may set it to 0. It does not say you may set X to 0 as you see fit.
> 
> FFmpeg yes, though if libavformat as a library is supposed to have such
> a notion is a different question.
> If the code was in libavcodec I would say it clearly may not use the
> system time unless provided by the calling application.

Probably true, though this wasnt the subject of the discussion.
How time is passed to lavf vs. security issues related to having the time.


> 
> > Thus if we set it to 0 we likely violate the spec, and as luca already
> > said it does cause problems in practice as well.
> 
> If it causes problems that would mean though that there are cases that
> are inside the spec and have problems. At least having a way to disable
> it would make it possible to test and fix/improve clients for this
> corner-case allowed by the spec.

There isnt much to fix, if the client doesnt have a reference clock, it
cannot play the stream reliably, its buffer will overflow or underflow
eventually.


> And one final comment: A reliable clock is by far not a given thing,
> e.g. FreeBSD running under VMWare has the clock running at roughly
> double speed. And even if you take countermeasures like running an NTP
> client time jitter of up to several seconds is possible. Would this
> qualify as having "no notion of wallclock or elapsed time" to you?

I doubt such a system could stream video reliably at all with or without
the timestamps.

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

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080220/94133e93/attachment.pgp>



More information about the ffmpeg-devel mailing list