From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id D980247282 for ; Sat, 2 Sep 2023 16:59:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 668F368C787; Sat, 2 Sep 2023 19:59:45 +0300 (EEST) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 83C8A68C5B3 for ; Sat, 2 Sep 2023 19:59:39 +0300 (EEST) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-3fef56f7223so1020535e9.3 for ; Sat, 02 Sep 2023 09:59:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693673979; x=1694278779; darn=ffmpeg.org; h=content-transfer-encoding:content-language:to:subject:from :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=2G5rdN5qc852uhuCmmRnLlh7j0zjrdXsrs/0+Yiqhfs=; b=LgtrbrKdXWD4deApkTYmLop38XQdueSdUxry7GywE2zaRj+thR+Lv2hPtAgp+CISfr Ha0AggMJOHSpFz83eEq1rmOzLY5YPCsJw9yjbFdQkl+0KS3/Lv7jGkPZ8OaDckkPFKcP UZiOTmCE4xsQbzzV0HG4AQLpR7QllT6GMGOgGJA2wSoDMOQXrMCcZbHV637Y6hYPYmK9 /ZDVk7n7fy6L5k2iqbbqbkThq/++BatCelv3pUMGzg5Bn+hp7nn7QjwVqvX+r50Fi0IA ljRYh+BoZDXWWpWcR58GxOpLsTTXS7wPhp7rOfhMiCqnY1NYhTSWVvJMbh+TbvZgYGv9 S2Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693673979; x=1694278779; h=content-transfer-encoding:content-language:to:subject:from :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=2G5rdN5qc852uhuCmmRnLlh7j0zjrdXsrs/0+Yiqhfs=; b=dCrtDK1k5TrsBRc3F4WYvaTtdsDCZgWneBLXnzaMStsihXEPW3EPcx43wyD5tbXXSn dAwP9HK8Y6YbvbXIMofobNgLAbJbjxJynoqE/sgvhG2pXr8JYRpqQIPy+Hq05QOCyV0r 2KuUJV0ntAGz58xqvG3WMZN2D1YS/VOJOTyql+hOR8l+T1uL8SkfDM2x3N4QHQjczTis cqTGLbSLaqg95O74eZEc/62SP7r7+sB4BkDSlTtEVUiCXHIKlQzgQWZ2KqW2FG65CGhS kr/0tjwrz5Bd8C16RTvFsSoUmlslYOs9KVOtna0zEIC66HuREXl8+MeavGfjJ6B8zNj3 EFBg== X-Gm-Message-State: AOJu0Yw2t7TItxD9VQnpDIqrAbCqQXOkcg1akB6yWBLdNhQmgrO/ZKgv bnN18gqH9Ljm0NFFFAW0m0cm4CBCzSoGvQ== X-Google-Smtp-Source: AGHT+IEL5GzTlN46JkEjCyHo13JikwTWBGCb1YnAR51SFDUqsYhbpSrjroYlXfPpxS5pEWJOXm4DaQ== X-Received: by 2002:a7b:cb95:0:b0:401:bf87:989c with SMTP id m21-20020a7bcb95000000b00401bf87989cmr4005911wmi.34.1693673978663; Sat, 02 Sep 2023 09:59:38 -0700 (PDT) Received: from [192.168.3.218] ([151.48.239.185]) by smtp.gmail.com with ESMTPSA id 10-20020a05600c234a00b003fc06169ab3sm11605402wmq.20.2023.09.02.09.59.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 02 Sep 2023 09:59:38 -0700 (PDT) Message-ID: <441e14b4-1d96-b61c-991e-056598af3e6a@gmail.com> Date: Sat, 2 Sep 2023 18:59:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 From: Alessandro Ros To: ffmpeg-devel@ffmpeg.org Content-Language: en-US Subject: [FFmpeg-devel] [PATCH] avformat/vpcc: fix vpcC generation for RTMP X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: In order to send VP9 tracks with RTMP, the enhanced RTMP specification tells that VPCodecConfigurationRecord, a.k.a. vpcC ISO-BMFF box, must be inserted into a metadata message. However, the function responsible for generating vpcCs currently returns invalid boxes, that are lacking the Version and Flag fields, inherited from FullBox. For some reason, both flags were being added manually in movenc. This patch fixes the issue. Signed-off-by: Alessandro Ros --- libavformat/movenc.c | 3 --- libavformat/vpcc.c | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 7ef6cef46a..696ae5a6c9 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1441,10 +1441,7 @@ static int mov_write_vpcc_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *tra avio_wb32(pb, 0); ffio_wfourcc(pb, "vpcC"); - avio_w8(pb, 1); /* version */ - avio_wb24(pb, 0); /* flags */ ff_isom_write_vpcc(s, pb, track->vos_data, track->vos_len, track->par); - return update_size(pb, pos); } diff --git a/libavformat/vpcc.c b/libavformat/vpcc.c index ea66959abf..256407dd6d 100644 --- a/libavformat/vpcc.c +++ b/libavformat/vpcc.c @@ -208,6 +208,8 @@ int ff_isom_write_vpcc(AVFormatContext *s, AVIOContext *pb, if (ret < 0) return ret; + avio_w8(pb, 1); /* version */ + avio_wb24(pb, 0); /* flags */ avio_w8(pb, vpcc.profile); avio_w8(pb, vpcc.level); avio_w8(pb, (vpcc.bitdepth << 4) | (vpcc.chroma_subsampling << 1) | vpcc.full_range_flag); -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".