[FFmpeg-devel] Another nice RTP bug...

Wolfram Gloger wmglo
Thu Aug 23 13:23:31 CEST 2007


Luca Abeni wrote:

> Here is a proposed fix
> --- libavformat/rtp.c	(revision 10178)
> +++ libavformat/rtp.c	(working copy)
> @@ -772,15 +773,22 @@
>  static void rtcp_send_sr(AVFormatContext *s1, int64_t ntp_time)
>  {
>      RTPDemuxContext *s = s1->priv_data;
> +    static int64_t first_ntp_time;
> +    uint32_t rtp_ts;
> +
>  #if defined(DEBUG)
>      printf("RTCP: %02x %"PRIx64" %x\n", s->payload_type, ntp_time, s->timestamp);
>  #endif
> +
> +    if (first_ntp_time == 0) first_ntp_time = ntp_time;

That doesn't look thread-safe -- first_ntp_time should perhaps
go into RTPDemuxContext?

Regards,
Wolfram.




More information about the ffmpeg-devel mailing list