From patchwork Fri May 21 09:17:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 27875 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp342425iof; Fri, 21 May 2021 02:22:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcKlyzeofTiHZQ/15dHH96DPALMfSQ23zXmDywUEC9/0L7v5l7fJBu38aBdcPSahAa1kw/ X-Received: by 2002:a17:906:d922:: with SMTP id rn2mr9376261ejb.469.1621588963478; Fri, 21 May 2021 02:22:43 -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 r21si6175783ejo.341.2021.05.21.02.22.43; Fri, 21 May 2021 02:22:43 -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=nbP4NuCR; 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 2B35A689FFE; Fri, 21 May 2021 12:18:37 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075019.outbound.protection.outlook.com [40.92.75.19]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B0728689F8C for ; Fri, 21 May 2021 12:18:35 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b0MdSkRlkos4SCuDPcExeYCq7DivexgukhtAtCMcUQMllFwEY4LyXsoHQTS9rJpPfhD8do9WWef82fDPaKoR8A7xYustmPpvEoVIA+ynvbMtxqr9dTHBXji21O2dmSC2g9JLNbskpqR/5sV5+x14WUXMCbJtpC/Gr53rewfnpj6T1IGF4D0RjXSSNZzXk6Yg1MU+s9pGhhsjAe9l9f5/6Kg5+HDfcAXSx+a8qleKlu/yJDwBRuv/rT5XmU7qA3G9svLYJ7VCARBdnWGjyJZMTNnO0IiV5xW4Pof5mESaJ5ldcTjwnu3NRHIulqmPMKdAMvaPBE6RPhhpP3EY1iAlzw== 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-SenderADCheck; bh=/XpLxGdm6Vpkl6a0Qoh9Mx0keWsY77C9y7AGleh0uec=; b=VpWpUQPLWSBz3a0IMA7bqoA6VEz6p64H8BLjsSop1vkvTF1E6CpY+g+uwRcMe8tXQ/XuKwN1kpaq/IeYtnv9i3FKOLbLMf78OguggHS279MmpFHyPxw4B5H6DfQ4sV7JwiGZUQpayFpPEDm0EIAHw62O8wV1Qu8NMveUdGVW5nwUgztZ+s0h2scdh7/PvS7nt3HZzp3zsUPGlv4qBJGII2Qbfju92w3E6sctgkTUjgE1PdOrPjIWQyLGc7YAf3gTMn0k3lfLG4kfiXdeCV2WG+C02zGfVPYJ1wGQUpup01rjbQlF5PHde9HAY3+ixQhmE57JJ27zppiJlInbUcKDXg== 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=/XpLxGdm6Vpkl6a0Qoh9Mx0keWsY77C9y7AGleh0uec=; b=nbP4NuCRGF8qWdLvCHWcSHCmAtAtgwLrNzdl0t0Tg9PFarFF9OieQFafuxcXGeZZDd7+6z26MCJM5rOj7dlqPycvKNbYjzEsU6b+NcPm5TtYRPpY9tE6WYl/Lr6rV435SkKXOz2QjiindFfs1n49YJ0kN8ntM8NI31wTWJAc4u10q0QcgSqEvtMNU6IfOLJuW89QRuch19uWIpyFdFE9TfSqNVOqYzsrjgFIy2PM1OTduXUqQ0oq4Lfbm0fcrws58Rdctn1KNw4vK8mGVnwD2HbJLh9Bpn55CKX/ifajL2LJ9xQJOLnbXPDt63HqIyxmThZySKfsjvE6nKJ61CosVg== Received: from DB3EUR04FT030.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0c::41) by DB3EUR04HT022.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0c::312) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25; Fri, 21 May 2021 09:18:34 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:7e0c::41) by DB3EUR04FT030.mail.protection.outlook.com (2a01:111:e400:7e0c::99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Fri, 21 May 2021 09:18:34 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:1519BFD2270E74DC69BC482D14C94C0412D7587304B06677000E75B8DC778C70; UpperCasedChecksum:E3E08292457A6A33C33481DFDF09C5D7BE14578A764CD413E8F408146FA77125; SizeAsReceived:7586; Count:48 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::f4cc:63fc:9cef:37fb]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::f4cc:63fc:9cef:37fb%6]) with mapi id 15.20.4150.025; Fri, 21 May 2021 09:18:34 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 May 2021 11:17:32 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: X-TMN: [dDraQSjkTDWLRYQTWIIulFuoFmcf2gHF] X-ClientProxiedBy: PR0P264CA0070.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1d::34) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210521091742.184902-28-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.95.27) by PR0P264CA0070.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1d::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Fri, 21 May 2021 09:18:33 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: b6bfe028-f5ec-44dc-39d6-08d91c396856 X-MS-Exchange-SLBlob-MailProps: dEG5jEBie8lPV5Pm7qExlN5LalDEj9QmotHqbyZbqR8lgazwPW3+LzDWQiYOmy50eHex7wDB3XIjMYFnzTQ2yLG9opLWaIvdgf6C7wH0OeiGSXYQBKZcqKZlROa9qaWf0xdAYCvxypVCenRLwOgMFRKbno1//AjfTcmRrrkhRlTFujXbi8ClMwZG9T+2Di434IqY+tfCgals+12J3Oni0e5st7YKiawO51uQlKTvV+L1Dd3bLJwbKBz7Ol6yt0bXlRs+EGh3hnlF4NKOUFiKUj2fC53GRLYKAJS8aV6UJnSvwa2Plv4QQvuc/DZ8lJdrtqNJw9T+Z6oCm6HTAKPD7AjbeitbCEMoFh9wkX9mXeQTtQ/3qstdtFIl90J/pyh2++8An9xc7Mx1Syuvml7zfe7OdqVUH+5ufoZSy0MTo/vPBbwDHVlvjCachE6FqE5Jg2eCZcqOIc1lXFBqHebWX1NwHKtstwPtQgE8HHocc/h5CZGVme8nyztuM398kC0WfLZc7URifjsyeGdqtLPY2yO9RUbk0MOPrSg7X04GrLFSlFXJSB9O52ww3Ah3hBfH49m5hqQrLTMaGFPwOeJXbB1DJXIKl4Fq1RT3BTMvWp83zYOFnw1I0bmBZJAfOXsDQVF9D35p1Nqp7mVO48IUI5UjcUdUBxmcIbeETAER7jhPIUFbAiZ/NA== X-MS-TrafficTypeDiagnostic: DB3EUR04HT022: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3KiJUWqsfQaMPo+7mf/sB1kYfKGK5LMFm/FhiVK7Mt33aLDBlNQjLbteaDw3X/WOyr7q/5YbAkHBQ0kZjp6GLOzvFiPQQ5CZ0PvruCVJvCv3giAbBChloHZha2njkh+UrdMMj1JpuxMvlTO3zVXFS/ZxBKw5vNuDtSRacDhilaDHj2+m/SC7ZMdMu2Db6SM3n971TpnO16s4hnJExz0QdjxYmOBxrrd8v1H4zPvU7IcEdZmwXfiZ3+6jBx6GeG++8TC4HM0P1XE8v8hzY/l0Bhac5SALdyZGF8VXHxohREnJcrh6oAmzLt1UedP0U2TX90C6SzFDBBxAO7e4mi3SPbtgH0+pm0oies2wT3Uje3BXVcILEId3DBOBJw/FznGn0ju7jox9W0A1m2FrTg9TrA== X-MS-Exchange-AntiSpam-MessageData: cPkefmbIrA7bEn0HTzswVOLegnO/Oxo+5S6qQkHvg/q4yE7hoLcCpQzuPedxFH9R7BTpoS8vh3ahyFdfwyLFza05NfYjGqYiw9UzeZo3VnpOOia0iLABo4kQHF9XqJUk84viwnt6ybTkac2zngLbbg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b6bfe028-f5ec-44dc-39d6-08d91c396856 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2021 09:18:34.1249 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB3EUR04FT030.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3EUR04HT022 Subject: [FFmpeg-devel] [PATCH 29/39] avcodec/omx: Zero packet padding 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: CAaGLKpHVDc9 Signed-off-by: Andreas Rheinhardt --- libavcodec/omx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/omx.c b/libavcodec/omx.c index ddb3ba4f66..9597c60057 100644 --- a/libavcodec/omx.c +++ b/libavcodec/omx.c @@ -871,6 +871,7 @@ static int omx_encode_frame(AVCodecContext *avctx, AVPacket *pkt, memcpy(s->output_buf + s->output_buf_size, buffer->pBuffer + buffer->nOffset, buffer->nFilledLen); s->output_buf_size += buffer->nFilledLen; if (buffer->nFlags & OMX_BUFFERFLAG_ENDOFFRAME) { + memset(s->output_buf + s->output_buf_size, 0, AV_INPUT_BUFFER_PADDING_SIZE); if ((ret = av_packet_from_data(pkt, s->output_buf, s->output_buf_size)) < 0) { av_freep(&s->output_buf); s->output_buf_size = 0;