This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 80d5fb2ee9 avformat/whip: use av_dict_set_int() for payload_type and 
ssrc
80d5fb2ee9 is described below

commit 80d5fb2ee998ae3ee8b6bd21ff0c7159cf64ac62
Author:     Jack Lau <[email protected]>
AuthorDate: Sat Feb 28 09:35:44 2026 +0800
Commit:     Jack Lau <[email protected]>
CommitDate: Sun Mar 1 07:02:34 2026 +0000

    avformat/whip: use av_dict_set_int() for payload_type and ssrc
    
    Now WHIP can directly pass SSRC as UINT32 instead of
    converting it as INT for match wrong rtpenc option
    range Since 69568479a9.
    
    And Converting SSRC from UINT32 to INT64 is safe to
    pass by av_dict_set_int().
    
    Signed-off-by: Jack Lau <[email protected]>
---
 libavformat/whip.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/libavformat/whip.c b/libavformat/whip.c
index bad0f38a26..aeb2c186aa 100644
--- a/libavformat/whip.c
+++ b/libavformat/whip.c
@@ -1601,7 +1601,6 @@ static int create_rtp_muxer(AVFormatContext *s)
     AVFormatContext *rtp_ctx = NULL;
     AVDictionary *opts = NULL;
     uint8_t *buffer = NULL;
-    char buf[64];
     WHIPContext *whip = s->priv_data;
     whip->udp->flags |= AVIO_FLAG_NONBLOCK;
 
@@ -1663,10 +1662,8 @@ static int create_rtp_muxer(AVFormatContext *s)
         rtp_ctx->pb->av_class = &ff_avio_class;
 
         is_video = s->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO;
-        snprintf(buf, sizeof(buf), "%d", is_video? whip->video_payload_type : 
whip->audio_payload_type);
-        av_dict_set(&opts, "payload_type", buf, 0);
-        snprintf(buf, sizeof(buf), "%d", is_video? whip->video_ssrc : 
whip->audio_ssrc);
-        av_dict_set(&opts, "ssrc", buf, 0);
+        av_dict_set_int(&opts, "payload_type", is_video ? 
whip->video_payload_type : whip->audio_payload_type, 0);
+        av_dict_set_int(&opts, "ssrc", is_video ? whip->video_ssrc : 
whip->audio_ssrc, 0);
         av_dict_set_int(&opts, "seq", is_video ? whip->video_first_seq : 
whip->audio_first_seq, 0);
 
         ret = avformat_write_header(rtp_ctx, &opts);

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to