* [FFmpeg-devel] [PATCH] lavf: add the RTP base time to RTCPServerReport
@ 2026-02-23 11:09 Branko Subasic via ffmpeg-devel
0 siblings, 0 replies; only message in thread
From: Branko Subasic via ffmpeg-devel @ 2026-02-23 11:09 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Branko Subasic
This is needed for the application to be able to calculate packet UTC
times. The RTCP packet is sent as side data to the next AVPacket, but
there is no way to know how the timestamps in the RTCP packet relates
to the pts or dts in the AVPacket.
Signed-off-by: Branko Subasic <branko@axis.com>
---
libavcodec/defs.h | 1 +
libavformat/rtpdec.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/libavcodec/defs.h b/libavcodec/defs.h
index b13e983b13..c6a941e172 100644
--- a/libavcodec/defs.h
+++ b/libavcodec/defs.h
@@ -348,6 +348,7 @@ typedef struct AVRTCPSenderReport {
uint32_t rtp_timestamp; ///< RTP time when the report was sent
uint32_t sender_nb_packets; ///< Total number of packets sent
uint32_t sender_nb_bytes; ///< Total number of bytes sent
(excluding headers or padding)
+ uint32_t base_rtp_timestamp; //< Base RTP time, obtained from the
RTP-Info header
} AVRTCPSenderReport;
/**
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index 5872c0f59c..dddcb17d89 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -197,6 +197,7 @@ static int rtcp_parse_packet(RTPDemuxContext *s,
const unsigned char *buf,
s->last_sr.rtp_timestamp = AV_RB32(buf + 16);
s->last_sr.sender_nb_packets = AV_RB32(buf + 20);
s->last_sr.sender_nb_bytes = AV_RB32(buf + 24);
+ s->last_sr.base_rtp_timestamp = s->base_timestamp;
s->pending_sr = 1;
s->last_rtcp_reception_time = av_gettime_relative();
--
2.43.0
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-02-24 22:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-23 11:09 [FFmpeg-devel] [PATCH] lavf: add the RTP base time to RTCPServerReport Branko Subasic via ffmpeg-devel
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git