From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 865F74CEDC for ; Mon, 3 Nov 2025 02:39:25 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'UzLZi1mEh2OB097xxrj+NG0BktLwi8M76LYHHi6ylNA=', expected b'ADPVEsQYfdyfliXK1ZzDgOIkOPW4louoaIamFlddtFg=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1762137473; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=UzLZi1mEh2OB097xxrj+NG0BktLwi8M76LYHHi6ylNA=; b=XhZp31AYLu+hx1ixNBFb8rrmxkLdvF5Cw5sVvGZttLacvQ+74SA8mzIdwRgOOwxq83sQd oR1vsTKDeWfMIMa94U5T1iwWZkaGZncvY5BCH6sS1bTdHIVjroBY3Syw0H5YVXPmCfdlZDX B54IaOjtvDte/o9kA/F7TzfYWcHjOyIxkQmCAi2uIufRLNUCcbMJJbGTkFUct4XghB0FlVj QTWfNJhPufscfyW1lCHGfbi9EvT79hC2hSYu/TR6KJpezUuCHNG49HuLIGv4T+qFqeswq6j N0RpY2Jeu3YXEBayPFUQKw3Jy329prosiULHKyZ2l38GclHgJo81P8s59fFQ== Received: from [172.19.0.2] (unknown [172.19.0.2]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 33C9A68FA66; Mon, 3 Nov 2025 04:37:53 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1762137440; b=JYoSUqMU+6Uqr90ewct5M9mYK5dtw1TtgA0vKlkZoC2mnCg7KhneIwxcaf5XgBEWWjVgj JDayH+tnCtd7a6MvCHMlbcZwT9FdCmZ5UBLscyq4dWc4FnQhSExYd42n7AGr2Dzn99akwsv nME68oUtZMQmV8Gh0RcIxZeEo+nmaZVgypcTeC+VvfwvEFyOh1rJAzfJ1GYrR9Cy472wTyY TIi4xid6FA41BVC9tkXzGKae5sG5LjOfkcpkyjj5FLiRb8PdLfYg/0/JD5zT0W8s33/PkP2 IXqWe8JUoZX7ZeJspX+nF7KaS31vdFYe2ghGdTHUfzErgV+AEvwm2tCGAI/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1762137440; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=m2i4kkIX2le1iztBr24Zo+mfDJ0wCEStHApR5TylK8k=; b=dCBCXyMIKIYQTrjTCrpnteckhwuc1wBdLNnXNzO5sRCC8nQxOTTXcWLaN7oBcgE/IKgzT DuL4NLM1/3Ubfdyanb4S1t/Vtl70Htzd3ZwblLOzN9LX1jRFO05sSTUparp9t6OH81InMsp LR7ihuKsKlaXP/dyYY5ddsUh+E40FSMfXQlY/2PjKK2PNDVq2voZG7WWJowaWT66GVt3rDn xbd9wd0KdBoe6xJDJ9/InhtFwE4/2Z2SySvJDaV25ZIUMcN0UGZHZkmI+D4jDpBWPvWOWnm 0Ahin+RW+A6Kq7jgrrPjGZsaHAw6aC7jPMK8bfO/h+K0tqQ/TsTu1ToY6S8w== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=pass header.from=ffmpeg.org policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=ffmpeg.org policy.dmarc=quarantine DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1762137430; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=ADPVEsQYfdyfliXK1ZzDgOIkOPW4louoaIamFlddtFg=; b=Vj3lTJY6K1qkWTDfTvVRaS81KU+2UBByS6OJV9t4km2mFA07lSjOfRqlRVdw6dSJPSpCP Uw9OT59edCXV5/veeH2CK9g90upEYCdUHS9TFSveFVADnYRTSFWiC+p0eTMM3FItr66Hlfu NScUGThV4oPo4svu4pwLRwWrJH5H6mlIJlI3yUbE0Vn9h+f4CSdW5zgliQNN+scDH2h+jV5 2Ar64GpEBnkBXRj+lh04NshRuVgvgH/hFhfgXIiAwCaB67AFPuR9PKUod3xz+fpU3aluGG/ WGZWBRtGzubal3XJY8KVFIUbUy5pDc9tHqw0pqVjwu2kMuQQ3jECwRsxfeJA== Received: from 02c22a36bd31 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 6B6EC68F872 for ; Mon, 3 Nov 2025 04:37:10 +0200 (EET) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Mon, 03 Nov 2025 02:37:09 -0000 Message-ID: <176213743063.25.17518237075053839604@2cb04c0e5124> Message-ID-Hash: AQF3MG6DTRA4O5XXDYYKSK6FJKBLTRDF X-Message-ID-Hash: AQF3MG6DTRA4O5XXDYYKSK6FJKBLTRDF X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH] avformat/whip: fix hard code in SDP BUNDLE (PR #20825) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Jack Lau via ffmpeg-devel Cc: Jack Lau Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #20825 opened by Jack Lau (JackLau) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20825 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20825.patch In early code, the BUNDLE always has two stream id "a=group:BUNDLE 0 1" even though there's only one stream. This patch aims to dynamically set BUNDLE value. Signed-off-by: Jack Lau >>From d8d586fcd45cefc14246013fb1943975ce1a0e30 Mon Sep 17 00:00:00 2001 From: Jack Lau Date: Mon, 3 Nov 2025 10:20:50 +0800 Subject: [PATCH] avformat/whip: fix hard code in SDP BUNDLE In early code, the BUNDLE always has two stream id "a=group:BUNDLE 0 1" even though there's only one stream. This patch aims to dynamically set BUNDLE value. Signed-off-by: Jack Lau --- libavformat/whip.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index a11fffb9c6..2a83fe991c 100644 --- a/libavformat/whip.c +++ b/libavformat/whip.c @@ -602,6 +602,8 @@ static int generate_sdp_offer(AVFormatContext *s) { int ret = 0, profile_idc = 0, level, profile_iop = 0; const char *acodec_name = NULL, *vcodec_name = NULL; + char bundle[4]; + int bundle_index = 0; AVBPrint bp; WHIPContext *whip = s->priv_data; int is_dtls_active = whip->flags & WHIP_DTLS_ACTIVE; @@ -629,16 +631,27 @@ static int generate_sdp_offer(AVFormatContext *s) whip->video_payload_type = WHIP_RTP_PAYLOAD_TYPE_H264; whip->video_rtx_payload_type = WHIP_RTP_PAYLOAD_TYPE_VIDEO_RTX; + if (whip->audio_par) { + bundle[bundle_index++] = '0'; + bundle[bundle_index++] = ' '; + } + if (whip->video_par) { + bundle[bundle_index++] = '1'; + bundle[bundle_index++] = ' '; + } + bundle[bundle_index - 1] = '\0'; + av_bprintf(&bp, "" "v=0\r\n" "o=FFmpeg %s 2 IN IP4 %s\r\n" "s=FFmpegPublishSession\r\n" "t=0 0\r\n" - "a=group:BUNDLE 0 1\r\n" + "a=group:BUNDLE %s\r\n" "a=extmap-allow-mixed\r\n" "a=msid-semantic: WMS\r\n", WHIP_SDP_SESSION_ID, - WHIP_SDP_CREATOR_IP); + WHIP_SDP_CREATOR_IP, + bundle); if (whip->audio_par) { if (whip->audio_par->codec_id == AV_CODEC_ID_OPUS) -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org