Commit 7df57325a0 for ffmpeg
commit 7df57325a0c58cc62f582e2206a3ee2f4b12819f
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Wed Nov 18 22:12:51 2026 +0100
avformat/rtpdec: attach the sender report only to a packet with payload
A report attached to the empty packet of an incomplete frame was lost
when the depacketizer reset that packet to return the frame.
Found during review of the fix for the security report lpyS49qp7Khk (ANT-2026-8V3C20FG)
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index 45c0d42c73..8bb1816c8e 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -632,7 +632,7 @@ static int rtp_add_sr_sidedata(RTPDemuxContext *s, AVPacket *pkt) {
*/
static void finalize_packet(RTPDemuxContext *s, AVPacket *pkt, uint32_t timestamp)
{
- if (s->pending_sr) {
+ if (s->pending_sr && pkt->size) {
int ret = rtp_add_sr_sidedata(s, pkt);
if (ret < 0)
av_log(s->ic, AV_LOG_WARNING, "rtpdec: failed to add SR sidedata\n");