From patchwork Thu May 2 21:34:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 48471 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:e687:b0:1af:836d:81b3 with SMTP id mz7csp354899pzb; Thu, 2 May 2024 14:34:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWRs4O4gEQy2NqTbxk5AdNGuLi3itWAW4y9Aae3IkWTb5ZZLIj5AKGgL1TJmmOFMwYMEPquPHMPj7aVFtV7uzP1lPfg+xoM+y5ChQ== X-Google-Smtp-Source: AGHT+IGz8cHvVsYaLMFW5yO5ez/8Bd3bbpocxmNgA4JjyF082N6OWv1JFp8+NpjYguFafyjavSXF X-Received: by 2002:a50:8d58:0:b0:56f:e5dc:e6e8 with SMTP id t24-20020a508d58000000b0056fe5dce6e8mr372057edt.27.1714685676674; Thu, 02 May 2024 14:34:36 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id k26-20020aa7c39a000000b00572afb2bba0si849157edq.631.2024.05.02.14.34.36; Thu, 02 May 2024 14:34:36 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=kH8pNmDM; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 516C468D87E; Fri, 3 May 2024 00:34:33 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01olkn2068.outbound.protection.outlook.com [40.92.65.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ED93668D775 for ; Fri, 3 May 2024 00:34:26 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Az0adxYwkzPnQHTncpQWp9dLhdHRp56desVDhpR/+0IturX82zCLtS2xJpk4mMFB1M2SinfpxZEJgzXjG4/h5JhdpiqBoIljwz1/3tEjKhAd3lv9jEDQPS674ppx6IWIYbbYs07X5tQmYYk0j+ihs419xlvd68a69Ibw1BEQ5E7Kny1+1/aPGc98yL5mI1FIfJ18XnAJEaMPkOs6kNDoJltpAudkB+er/4uZE8NBoOpAvC8Wjhkfjdg5Ixu9Ujkv/ywpbsI/4QvYS8UtVm/0RPClT7qBmHwh4c0czz7jKp6ET8dHKA/ae9luf31xa2kvKmC5DbeXLKZmIyDVffr0fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vdUq6yy//kxIEbS46SCJVnYrUECbYEpzvNxOOCxfrkY=; b=Aaaj5hXveFhwGeXpNzn5fKWhGwETinTiYlv5UW+tzvnH8vQV/FeyUD5LuIrfgHnjmLwL4rsuZp3bn4iTuSVySS43Mswgq08W9u/xM6XZEGmH1+JefB1jmEbjERgpOizrdRsIT6JRk+qu5yVEuQ+wC87CateCtVyMdywBGivrxUvX7vbuTzI6QwJCF6TVlneUZLUpKN4wNvWwfaAsnIO8A6IfC4oVdLzFboALUphBhYEgjS+9zUqaumzOIJl/yS/BoH9UXHMOAhmFhxwH+R9+Bp82Ctkhd3LYppJN9AKfwcujhUN8Ev81SGCm6hhDa3U8hx4nto+9bFUDfeMBKHmwgw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vdUq6yy//kxIEbS46SCJVnYrUECbYEpzvNxOOCxfrkY=; b=kH8pNmDMxsKcGDXxk01d6cbNrd6IQy8ASmuka6OqY04ym7yNdRDWRoK2wxcI4j9olbfHlMqezULtXkar8B8Fug5dICBgIp374JMJTE+/j36I1bNbqzAjW5bXZeIrBk+8mJ3pxRKygprgswtmfEVziXTfSTyJ0zJhrutukrKRWAyuNDmXNSl8wL6WLB2d822qx08zX8X1BAFacPzUKuh00+rOfaAz91NpVIIA7CyHV8t6Lf/wfCY39fK1LYxyFEOV8v/ePf2pq9tFxUDUS8NCPYyMRtsv6zfUleFxV5cYS3b61GVRHTBM8Z9hWiBe97o+cMQd4AXRwCGU9z7xK5aQjA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0097.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:170::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.28; Thu, 2 May 2024 21:34:23 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::1f29:8206:b8c3:45bb]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::1f29:8206:b8c3:45bb%3]) with mapi id 15.20.7519.031; Thu, 2 May 2024 21:34:23 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 2 May 2024 23:34:15 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 X-TMN: [QQ8s7AA0OlKkIe3UsWqUKdgwx6bXP6Smf5S1qTdUcZw=] X-ClientProxiedBy: FR0P281CA0222.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:ac::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20240502213416.548055-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0097:EE_ X-MS-Office365-Filtering-Correlation-Id: ffdd469c-89e5-4af0-a50d-08dc6aefa284 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|1710799017; X-Microsoft-Antispam-Message-Info: 5EBqqZHC5RFdjYZTi1hL5g07U9OW0hGSjVQdZlrO1Pq0p1l/v9MtAnFXaIDy38CxCkVLwBWRzLMkr812Wab7ozgbiHULX/QY6zxURIQcCittkK31X/njOpDkBVjhYyV32shJw2FtMQ1p2m/IF/P16eYlKcrrRuXzfTTt4V6vNYrYW/BhlV5M4E9RleU2zOw1Nr4REu7RXPqe5ZG1aH+UyIyPBPWm5jy1Dvo1VJfTYsDQ23oQP+xGrpEsqAA1mDEOEI6HshXJGGJ9HUSBdIlvBwsJvtvDXJgSEa35b4K8rbVhhq1sxMBERxYT4hIxp+WHAuCFUVkmOhzY2I9FBGwd5RJD5ADqcW9VNKJ2LyebhPcIneElFKelnOVKbXNI/OEz3D5AVVae+fXNIqvg2Vp6zxDuc7joj9Jt8nKhFbJHFahaZ2Oc4ilawlybTL+spdPJD7IRn0bJsU5fmJUdg0XVrJI+LS6z/KLjxLYQfkKT6d2hPOd5BzDsfE2zmPopiR9Xzok6tVWFGgGj/zS3A/0pwL5eMIe7xhf0Mg+V0NJgGHz9MAutxa0l7OS5V3UG2Z1ByPzEAkpEnwkYMJz71kjX0W5UJi/yGeTdMzBJXglIyhFUQyeWZk0QFVR8J+0MwJPY X-MS-Exchange-AntiSpam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n9ncwHqQ9XfrdKQnvQLcniNNHg250J56SeezTekHuzcZzjkRM6xjprX0Ok4dobGahN3mcJqN3fYAF1xhSPQpoRPHOiivVxwTfm02Vf3RMizLZsg5w4sV0OEEIFjQHYu0vr1zA9wxg48Fy8nugSqTL1ATILjItC+KwQBL7i89Mgvz8avw+B9uHpESTWgcygscsXmBvp9rzYwL4EKWUvIQB6nqpGv5jw1acXD6Qp6Ds36a2QztWlfo/fkQXj2Ferf6yPX3FLomQQvTmEg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ffdd469c-89e5-4af0-a50d-08dc6aefa284 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2024 21:34:23.8811 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3P250MB0097 Subject: [FFmpeg-devel] [PATCH 1/2] avformat/movenc: Check av_malloc() 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: PgTNWgv58uWJ Fixes Coverity issue #1596735. Signed-off-by: Andreas Rheinhardt --- libavformat/movenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index e9bbfd67cf..b4c1db2774 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1221,6 +1221,8 @@ static int mov_write_chnl_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *tra if (ret || !config) { config = 0; speaker_pos = av_malloc(layout->nb_channels); + if (!speaker_pos) + return AVERROR(ENOMEM); ret = ff_mov_get_channel_positions_from_layout(layout, speaker_pos, layout->nb_channels); if (ret) { From patchwork Thu May 2 21:35:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 48470 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:e687:b0:1af:836d:81b3 with SMTP id mz7csp355604pzb; Thu, 2 May 2024 14:36:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX4BeROACbzC4fnBVq8yzkDlL4Yl2BsRRIzuBWnTE+6qa13gjQ3iEDAxlNFsL/npJ3EjpVI3JwCywQEPPCtkyRaMYpGL2Od/9gcbg== X-Google-Smtp-Source: AGHT+IGKlTT1Z+pqMVujkBDJQE1e/3AcepkRvVFhQ13cp7/B4nxjvlULqC5FUL/VRNckbTwklRzp X-Received: by 2002:a05:6402:1f4a:b0:572:543c:70eb with SMTP id 10-20020a0564021f4a00b00572543c70ebmr360477edz.2.1714685770282; Thu, 02 May 2024 14:36:10 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q15-20020a056402040f00b00571fcccf618si811203edv.507.2024.05.02.14.36.09; Thu, 02 May 2024 14:36:10 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=RXzbXr0T; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2F5F568D886; Fri, 3 May 2024 00:36:07 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01olkn2027.outbound.protection.outlook.com [40.92.65.27]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9BB7E68D7E6 for ; Fri, 3 May 2024 00:35:59 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PSL8ez0AuBhSl65XvnOieVew/YU/NyIOFx9hkprphuUhHEf2imtGEvVCari8xlp8mIwRuj02tXxVzm1b5hkIwF7duBP9xBCnp3GbZ/l0s4ARKQ5XKXASI/NgggHesttrLK7Qle/LeFRwW7pU2s0FnyD3WR8ChK6pUtnzo0pfB0dYoZ7PJJ6WC5aE7t20TslyTEo7WaIhPgOyg5ZmcULQiLynN4Fi97rp7cg8ulFqmLw3LyhIunW8zJo5xYdZ7dQrDtBRYw7QcoB0BgOcsbkjCqkHmjYCpqXVfeWs6x+3N71YcBPyH/A0KHTIiPB4KYO9Vu5LHSrd3fIcPDuJgHoj0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FbLd1IVvCgmJoo/WDcbP8mOjErQV69Kh5veUk7wBnGI=; b=hB5pYpI8BOmbc4gAe/A0Gf5G5XX8Zp+mbqxTBlHk2/eB3Y5gzqshx0IWI10WR5KZQgb0iPZZnqpA1imqeBi1Q79uS7+G5YnK/E6pc5wu0TQ1B/AuVGugew4gelh0jAjOu1qrZG8FyDICdT0GigMNUjFuyfUbOJP7SKjJfr8J4vUBNfTiKT2J9wqZYKViJdOrDNbg13w7DTjtiHCwplC2JJsOREps8SW7EN7KYreuJ6+ublXo6LSl4bMnnpHT5G/KJAkndKql2ZH3CCSJDaiY0Qdko592KOAnn1C/XobOExz1V2ZJcRvcIQFJPc2qaEjmkKezJ04RAoGMX/qG8fLm6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FbLd1IVvCgmJoo/WDcbP8mOjErQV69Kh5veUk7wBnGI=; b=RXzbXr0TecaIThl13GlbNTKN2GY0dVQh+HkadEWHXzT387mqVEK1koeIIXX1lxtEAcGlA8Pqwa5PkhcupjloHv9eikZks8gBIK3SMLlKicwf+HwkCgpAO77FrYjl/ROGFzqbaYcPwB17ckDgRu+wpyMf6lRlm/yBd3JaP9G/8Rit8zaWJjC3+vzrTGtGEl/RD4D3CHa9ExfawjiKBXatckTIjhq2SWyWsEvtbwpB+xxSNTwPoAEC3lr4eBzro0RvB8zLwb0bFMJWKa8OFFFAu6sX6WFKs1ZBBolR6NrIf8v+VoxseE8cICC9OIR32fEdEQegcIxnVIILt3a5KpP3qA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0097.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:170::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.28; Thu, 2 May 2024 21:35:58 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::1f29:8206:b8c3:45bb]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::1f29:8206:b8c3:45bb%3]) with mapi id 15.20.7519.031; Thu, 2 May 2024 21:35:58 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 2 May 2024 23:35:51 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [W24N6r4iDY4vcWByGGqINZnRPLchiPjChDiCC77IeUI=] X-ClientProxiedBy: FR0P281CA0130.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:97::17) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20240502213551.548188-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0097:EE_ X-MS-Office365-Filtering-Correlation-Id: e73dcb51-9763-4bc8-4b40-08dc6aefdaeb X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|1710799017; X-Microsoft-Antispam-Message-Info: wNnacpe3HXuu3ZEdLYgmErJAuUcoMWWOX2FCt6ORESM6Afth8ltlveA6pGc0vfIFQDv+QCj80y8aXS1siccXWEFm1oQWy0s2jFJoye+gnrEH+OGLGErY5uCeZPBADKAgLfqi83KXyE5merQe3bv8Zi06HNkSp0EgkOHlsUAYllWdwohAp262kxs+JXkfYZsStO9abLr1ckMYoX0Ef6cCmGKYPNWi4HY8QvzJFQeuNoC1D7mdn1/TosYs7iOPJl4dwj4EAxFsH/Z3hesjIkC/HuHjPVKSXl5mKjWEE+f1WD1kRhHhC5oJCleuEWgdxAUsvjfvSwGHmRkPc4DyjrNmpVb8nWMzEkpyvuSGUakXBcz8OA4LKtCYQzWohomLRv4LeudBvQdiTKV9JbxvtNzP9hutHU0vyZNEBBLocUNS9JCxi5ImR8nAnRfY/qwCmTnyjiwp4xqMXVkUvZGQuZbVaFUa9uNIXPJM2QeUxjYu4G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AyIih68IpamLsyDMSyvIVf9pH3OYVKc30Im5KWBFiR9JJL9M/IkUexLv4PdpOPuuaAnZ12MeTItWIKXgHkQT9N/HxpRR0G87a/l8R5Rm0WbdOcN3RWtf2L3VBspE1XawY2i4z6sDMqsFA6EtmXH1fZWd0iM797PtuDazFM7S202VqExacOmpBntiXbUi86GpoHz+niGj8G9mfK9L/bgSfGeemddWpW09qdsAnnQKMjSO/DhYoZlmE69WF6PXyyKfo4CEPHsuU4UNi+lbUh1x19w6hufsGizC2QeHwbSWKAXdG6uiri4MTpvQsvq8hMnBDyLUuxQSAryWqtl1QgkSqFYqN79UQd5gdX/qMSny0dmSaT0Q+rBNkJkESSe6zx+1Dr7YrNmBfyfkgpZrAXGs1SHX4ene31DPFc3tCsKLIA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e73dcb51-9763-4bc8-4b40-08dc6aefdaeb X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2024 21:35:58.4850 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3P250MB0097 Subject: [FFmpeg-devel] [PATCH 2/2] avformat/movenc: Avoid loop for writing array 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: vSg/aCnJBu9Y Signed-off-by: Andreas Rheinhardt --- libavformat/movenc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index b4c1db2774..f907f67752 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1244,8 +1244,7 @@ static int mov_write_chnl_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *tra if (config) { avio_wb64(pb, 0); } else { - for (int i = 0; i < layout->nb_channels; i++) - avio_w8(pb, speaker_pos[i]); + avio_write(pb, speaker_pos, layout->nb_channels); av_freep(&speaker_pos); }