[FFmpeg-devel] Extracting NTP timestamp from RTCP

Michael Niedermayer michaelni at gmx.at
Thu Dec 5 01:08:21 CET 2013


On Wed, Dec 04, 2013 at 04:55:36PM -0700, Fred Rothganger wrote:
> On 12/04/2013 08:09 AM, Michael Niedermayer wrote:
> >diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
> >index 6fdc908..5e73661 100644
> >--- a/libavformat/rtpenc.c
> >+++ b/libavformat/rtpenc.c
> >@@ -119,7 +119,7 @@ static int rtp_write_header(AVFormatContext *s1)
> >          s->ssrc = av_get_random_seed();
> >      s->first_packet = 1;
> >      s->first_rtcp_ntp_time = ff_ntp_time();
> >-    if (s1->start_time_realtime)
> >+    if (s1->start_time_realtime != AV_NOPTS_VALUE)
> >this looks like it breaks ABI
> >a application that means "no value" would have used 0 before but now
> >0 is interpreted as a litteral 0
> >
> >
> 
> I thought that was the whole point of the previous conversation.
> Reimar was concerned that we should have an explicit "not set" value
> that was different from 0. To be consistent in the use of the field,
> we should respect the "not set" value during encoding.
> 
> Please clarify the nature of your objection. Are you saying that:
> 1) ABI changes are simply not allowed.
> 2) A more significant version number should be bumped to indicate
> the ABI change.
> 3) Use 0 to mean not set.
> 4) Give the field different semantics (however slight) between
> encoding and decoding.

change the meaning of 0 with the next ABI bump or introduce a new
field but that might be overkill, dunno


> 
> In practical terms, someone will only set this field if they know
> the precise time that the first frame was captured. Otherwise, they
> will not touch it at all, and the default ("not set") will remain.

maybe, maybe not.
iam pretty sure some applications set some fields based on their
internal variables unconditionally


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131205/d103be69/attachment.asc>


More information about the ffmpeg-devel mailing list