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

Michael Niedermayer michaelni
Fri Feb 15 12:31:12 CET 2008


On Fri, Feb 15, 2008 at 10:52:57AM +0100, Reimar D?ffinger wrote:
> > Anyway, as far as I understand there is no choice, because the
> > standard mandates the use of NTP time. And I do not think that
> > this code is sending out any information about the local
> > computer (apart of the fact that the clock is currently set):
> > this code is used during live streaming, so the receiver can
> > already know that I am sending the packets now, even without
> > reading the NTP time in them :)
> Uh, as I understand it, this sends out the local time with usec
> precision. The server sure as hell does not know that, and it could e.g.
> be used to guess values if someone uses a stupid random number
> generator, system/network load and other things.
> IOW this is one of the things everyone planning a side-channel attack
> just dreams of.

Use time/1000*1000 and you loose less information.

> > In any case, if we can find a standard-compliant way of setting
> > the RTCP fields without leaking information about the local
> > system, I am in favour of it (suggestions welcome).
> Why would it need to be standard compliant? There is no single computer
> in the world that has a exact time, so requiring to send out the current
> time is impossible to fulfil anyway.

I dont think the absolute time values matter, but the relative ones likely
do, for av sync, for clock drift (just think of what happens when playing a
realtime stream and a clock which is a little faster than what the server

you could also try:

    static int64_t i;
        i= av_gettime();
    return av_gettime() - i;

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Thouse who are best at talking, realize last or never when they are wrong.
-------------- 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/20080215/1d9a037e/attachment.pgp>

More information about the ffmpeg-devel mailing list