Message ID | AS8P250MB07444302CBC48705768B60C78F0A9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM |
---|---|
State | Accepted |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:999a:b0:a4:2148:650a with SMTP id ve26csp1833053pzb; Sun, 20 Nov 2022 17:07:31 -0800 (PST) X-Google-Smtp-Source: AA0mqf4naeZfeDdw8LxcXnhHJvpdMyWoDjhu2lUISNu6A8vgDNyGmZ16zl1k4KZtQIC5Ikue9LxS X-Received: by 2002:a05:6402:3895:b0:468:15f1:54b5 with SMTP id fd21-20020a056402389500b0046815f154b5mr13985197edb.8.1668992850958; Sun, 20 Nov 2022 17:07:30 -0800 (PST) Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id z8-20020a05640240c800b0045d523bee48si8764084edb.178.2022.11.20.17.07.30; Sun, 20 Nov 2022 17:07:30 -0800 (PST) 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=iMrwwAbz; 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 6B85868BCF8; Mon, 21 Nov 2022 03:07:22 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02olkn2059.outbound.protection.outlook.com [40.92.49.59]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 08C1E68BCCD for <ffmpeg-devel@ffmpeg.org>; Mon, 21 Nov 2022 03:07:16 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BNeUivBtrH2oM8pKcNsWXkhP4hRMo+KxNhqP6Mek5sCXn0/cnzEbuVf6Kf+/bHSuxX4sajYTFq01/HtFfupmPenzA0JJOckvHGal3cE8Y21EU9F4XJdbHEI0c9tvoWyawYdzRw+8WFE3KOXoPOqQ/VLKqJINV/osmiaKDysYf4tzrGI4namoM3z4dcPdfdq5bfdN3zFHCyl7UkrgPmCDQhvREpUO0skUrwjuC5/mnSncYWJpDMxVnoB9WtRp4IOZ72GTzdFCHN55ctzJTN7j4DD8KLNpmdWUq8zar2dHfo2XJdp3aO+rYMUY3zbAs7tfu+nGqMnb7kDwiNVn1ICMaw== 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=mg92jMrenUw2sR4AD3OMhwKLD1JKmdz7RgRTgQRS2g8=; b=ahi+HROjUxiro7ub0jSaU7XmTYNrPaJ26yApPIS42ZifEC+/WkQV3LaIgzSq1kF8doGTAjpitIpRSBgIXyijtGogeuzk2vZhYx3q6e0aBSYI3ZqofMlJ/Z8K59WgE1gCOLY2WnM1dNTKDQAzivZD0fyYaJb+tqSbdIjvN3YvC2ph/CkE9XgdLknJRhAmQGMvPUac4J2vPGFqVoH1dU1pD1b0B3WUhonT9SmoSkd6i+xsZ85dPQP8I2SD+sTU92heYOTzq4LvnpfxPQkUt8YQlMAJXesyCSO76V71vhJErDD7sN9bWSwrI0IjU6WGO+4aKBPS1FEOpfzMijwO9XbJIw== 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=mg92jMrenUw2sR4AD3OMhwKLD1JKmdz7RgRTgQRS2g8=; b=iMrwwAbzML+nzA9JudqCRlU1vZ2Ev7cdKH1X3T7IqVf2mArRafRc+7wALPfAziQocz83qVdFLw8f37DwQKpVvyTW/iZSxl6FR90b14HSWEcpRaWpBbysthxBo0T4iw+I3dBESYgemLa5xGt1onagkv8rSkC2S67uA55YDoj7hv4l0K77tekXrGYikXfu+BfEEgTx4CnR3sQ+BcUoX6M411FVWaP/XyPbsvn14+63OADk13xq+/Hfy5TzY6rtfZo29DICX81o4qqCBdfv/ykUWAQ5b3Vpo1EI9W8cGoeKhcOjSx4AwZ4K9XfzhxxiKZJC6Jovh2c/PwIHZ6AbN89sug== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PRAP250MB0465.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:278::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.15; Mon, 21 Nov 2022 01:07:07 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::c37:cabe:316a:60b2]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::c37:cabe:316a:60b2%4]) with mapi id 15.20.5834.011; Mon, 21 Nov 2022 01:07:07 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Mon, 21 Nov 2022 02:07:14 +0100 Message-ID: <AS8P250MB07444302CBC48705768B60C78F0A9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> X-Mailer: git-send-email 2.34.1 In-Reply-To: <AS8P250MB07445B7B475A910C6F1962868F0A9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> References: <AS8P250MB07445B7B475A910C6F1962868F0A9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> X-TMN: [/FoU2hOsRUtHadSfMv6T/yM1O6Z0qNn39jk79iTR6oo=] X-ClientProxiedBy: FR0P281CA0075.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1e::10) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221121010716.2131624-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PRAP250MB0465:EE_ X-MS-Office365-Filtering-Correlation-Id: 49c490db-a1ea-4a9b-1547-08dacb5cb5ec X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKw9/h+mHxnUXPC9/FuzQkCX/f5JQeEuPef2E9VHDCLya2WPU/LAftFBiWkEH6O0pxyUdzbNTUjOA2+KBc0omJSMAvGZ1PbJ4OOpJOYowzouHjtl9eNVydSlVouMRVJ1duN5kbut0fwZ5qRVB0XJ2vt1/NJV2lPH5gTFmg8KWLN9aBqK+K0vDunHQdjHVSBjlP6frG955Dn+5XISeBlTBjjCflxoSzLS58cCrwyJYV8AwdNdiNonYOgSB66+MjUGxvnoIxBrzKqYf17i0zZevYGFGj1bEZZaK46DgReLxkdgeDIT5DAOUHd1MFOwKYtv1uRABleCb1d/yqPAxLf1SVXTyyUQgOuh80Zh+5d++rw6MWVRmhq4RfFyS5qj7U/R486BkQoeUvEqnJb7eOQmUn6BwLprIUh2Hv9TsGs1KmJ15wCYoqf0YYCuZEgrUdHpiqHBeKR95WvJO58OP4yY5K4eRuGkU8Hi9y8gkm0f6s6dLPr1wohzDBU94KoLd/mFgtcsnho0CmWoFKh8I2EiI+NYjNip/GCxVngBDArVGvT9ETRKfdkg3RR/Lfm3gfdl6xyeGxqWnP6tWagk6k3IGuvSMJMpWAelfIQizmG2HmwwLbmCCfxwfBGCSVXbkWd8kuHogjI/vdGdHEjaO1lDLiRQellvE7MDG/spI+tw3eFgHXvwl9u4c+LxhUC80Dlp5QfJSJQYM3CvONlB+ksNU8f4O71WNv42e28= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: h0Wq8PZDIGb8VOQ871xH3tvzq4FiqsZTjGEUunEESs+gX/oLBzA6XsRdVsYCgR6s76iMBRO0WAVCaEwsRKOcXfPMwwSIwWvoFbg5YALxQxjrIZXQsGVZIobXATa9kRulFUphysrodwGoMCkywOm3NX+vGQHEzCjSxITHc8NzOI6a7JRxUB3GvregK05cPg+6TODJ0aK1JvqPzibY2RknMGODzs/kC9bSy0KHxjjpXGK7v8UGPbtJ9m+tof2ZKgdrfkXcnmxWPQS9NbHuRIEEYPsp2VS7un6ePxTwNIpPK6TK9qutKPw4jqkmYGKU3PQSRERY2vKVUe6dsDi5ARz78QL90jNJjyDio7CUqGbhHLzOr7ViNCkyFAnTHBrmulabUczKp6YyBcFT64RXk7m6w319N7py0xWGyEY4TnQmTqq8ldPuK0vNDKyZo4IE8Skg+IB7zu78snfS6ESmCpAzVducGWL8ExwjNheGpqg9Os3BvAMrUU8a4Xr8Gbmej27uXefZ7EZSMR1erixUPWZECsCbfWnY3R038gmF5DD07ppOt5j3R4XfBkRTVUVjeELPknGOUfRzw6O4Nn3ReQuv9ZCZRrCZWZo0qktRdh0RUiDnYFe0WRGCZUIkonHNUQYGW7SYDNW3QsJ0mdEIi/szqyxB/611c7L1C7E1EWk7XMQ= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lQcEazq4nK0ozXCHMduFVWm902ATat9feENZzliDC8xahf6zrCh15QqJB5c9LoMseWnXLAI1IgFpCxDHcOcvWNrd5rioL5JGY2Ecxe+UwP3MDkM9LuxYO4nOsb+7xGvWHJed0vNv14/+7I2guqsjBBpFATB30iVdC4qzjnYUy0iOm4VvB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MjXkjDcmRWR3PHLVpwDFXG4hSdi6YR6PXhmTaOUD5SwVsf/x5vkaWFKwj8HX5UC2P1otIkSpo+cFEsjvFh5 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49c490db-a1ea-4a9b-1547-08dacb5cb5ec X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2022 01:07:07.7955 (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: PRAP250MB0465 Subject: [FFmpeg-devel] [PATCH v2 4/6] avcodec/flashsvenc: Change check for first frame X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: RVb7TEGxbtdi |
Series |
[FFmpeg-devel,v2,1/6] avcodec/flashsvenc: Fix packet size calculation
|
expand
|
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c index bd912fb401..ba693ca8f3 100644 --- a/libavcodec/flashsvenc.c +++ b/libavcodec/flashsvenc.c @@ -209,7 +209,7 @@ static int flashsv_encode_frame(AVCodecContext *avctx, AVPacket *pkt, int opt_w = 4, opt_h = 4; /* First frame needs to be a keyframe */ - if (avctx->frame_number == 0) { + if (!s->previous_frame) { s->previous_frame = av_mallocz(FFABS(p->linesize[0]) * s->image_height); if (!s->previous_frame) { av_log(avctx, AV_LOG_ERROR, "Memory allocation failed.\n");
AVCodecContext.frame_number is actually only incremented in case encoding was successfull; if e.g. the ff_alloc_packet() below fails, it won't be incremented and therefore it is possible for the previous_frame buffer to be allocated for multiple first frames, leaking every one except the last. So check for whether there already is a previous frame instead. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/flashsvenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)