Message ID | AS8P250MB074493EDC773067B8ABF374F8F089@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM |
---|---|
State | Superseded |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:999a:b0:a4:2148:650a with SMTP id ve26csp773293pzb; Fri, 18 Nov 2022 19:00:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf4JTlZkDZfPL5UBSaTWx/fyT82kFSW89h+H6L/oN9TTOr8wnX7v1GYhQHhJj67T/YPRu6ML X-Received: by 2002:a17:906:597:b0:7a8:fd1a:c073 with SMTP id 23-20020a170906059700b007a8fd1ac073mr140828ejn.4.1668826819261; Fri, 18 Nov 2022 19:00:19 -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 q17-20020a056402249100b00468d5d7d4afsi4129287eda.440.2022.11.18.19.00.18; Fri, 18 Nov 2022 19:00:19 -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=bxhoqxP5; 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 3368B68BBBF; Sat, 19 Nov 2022 05:00:09 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2057.outbound.protection.outlook.com [40.92.89.57]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6E18768BBE3 for <ffmpeg-devel@ffmpeg.org>; Sat, 19 Nov 2022 05:00:02 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fzvlQPTcgyxbAY5IBxjEeyPcoP0WNlxtCFQFSVyBckHUKx/uKOqnqe777M9IhmjdvIuWCEB1wPm44g36GpcgJ8gJwflRhbBp4XiZ9RSS6oCPredUlap4FLGm7jA3vqNFp1nnm4yredmgXkRLo2rR39x0hjL6JKLzI2H0yWjm4gMKJ7ZkzADUXQCR+srDbfDb5m6pooIsIKdz4fbxT9A9RkLvAAg1blHsB17h5fpjz0cRDvMCCA1QyeaCJIN1J6TjAdYZP8fbgwBsJ7I5I9HxOdnyP1Qa6NLP3iqG5FcBkI8+9zfPk2BsoXoGYdIczNjpTSDzzRqdoROKMXk2G5n0vA== 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=3hkLOpP6Dosvy5yHQLnSecKdvxUS5p6a3WtYwgeFMj8=; b=l0QnVXyNaxltfUSSPxW73p8ZQQp9OQnXxLKnJ4p1X8DeLng5kM6Jt9/soCZ1FtAkXAGZwpauTa9JDaVDPcWqOOLCUReI07s1Tc7SHCuVzWqiGUG4nzMJnwiqRRfvI0lFHxPckyByPSMwbA1ws9+mb7DpiB7imbSoxbKGb9r2AL09LwMjKrhmWAHbRj3fc/q4rMEjqWx7T6cCk1PJLpejjMStPKEHPeSEJQkIXwGrWgycozZDUfU+vfcvawcdsrgOSWHBhSYrqCrUkIBDl6YZKP1VzqMHB3S2k4XK6BbnYe9Zqwc6X+zU/NTa0htkchd+oHuoruORQKOG3NGSvXSv/A== 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=3hkLOpP6Dosvy5yHQLnSecKdvxUS5p6a3WtYwgeFMj8=; b=bxhoqxP5LvreB+NpPSmoceeZWOigKb8SXDkL/VxXk2JlCpqxYrRhSpaVDPgbSAi9yBgDOHv1njfSoAeIpIZ6CG7pwVYyUGesy+fHRREpNFINp29KntFEfc9rwUQV2xfrZEm+B7efuCoXiwTrnRjvmYMXQLwlcQ97z4mCpx0YO90I4mzTXagVbaFieowRbQhfcTlsoAU3aBFFPZLkrXHGTqlv2teFLM1+Zn6bPvr7UWaJDuCX9kNm7LE9G4GLMDg9m/h2vwQrtBoxiIeXt/45tr9/S/glL2FXiaNJf72gbqpqWtqvI1x9VBrzIorFIv326FB4B6APXjKmXgPRHq4A7w== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0127.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:270::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.9; Sat, 19 Nov 2022 02:59:52 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5188:7559:45ea:5f52]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5188:7559:45ea:5f52%5]) with mapi id 15.20.5813.018; Sat, 19 Nov 2022 02:59:52 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Sat, 19 Nov 2022 03:59:53 +0100 Message-ID: <AS8P250MB074493EDC773067B8ABF374F8F089@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> X-Mailer: git-send-email 2.34.1 In-Reply-To: <AS8P250MB07443BBA100D818B6D4B83448F089@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> References: <AS8P250MB07443BBA100D818B6D4B83448F089@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> X-TMN: [KygkbPV1uku9qE/h3anUhk+sBKyxDGQmcF6femb0fCE=] X-ClientProxiedBy: FR2P281CA0044.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:92::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221119025955.1758795-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0127:EE_ X-MS-Office365-Filtering-Correlation-Id: 88124dfa-72e4-411d-37e3-08dac9da2159 X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKzQ+EiUC8SRy4slEJiQUIdMI0E9737jnnKWQEaEcUKBgMucpzRJMQUV5xtyQ8LvyT3m9IzIBPpBdH4XOp0jSNfZEGpeIpazT8v5RG5SuGzikhb6x7O5vHbaLTeuwJRLKeYK5VrhZ6dR3cmD726tNvIOCrOE2tllYs/s8YrEh7MubmyV5C8EvwsQUHgYdVfjGFyFIbcLqgjT4he562hchETPQiTOC/bgFmLwalY6phGKdS9jK9lFH8D2WcBu8G1JzINmlq4AbH5gDdSSJFYn4088sQqQ2i7Qx1ROdA2qv+PNT6ip+6VJsBfifAmYGzEIviLr1mn29qh58tHA7Q5SpDERLw+Dn4aez2P4LsaDk4sYQA+Gz8hYqHGICso86ujozzvT5oNayj5FALsQnOu1opd2AcoXxFnbQDq09Q4JyxOLhsn3KUzwxycrwW+0IIz4Fkk+oXCLLSKkB7RDUepnxvP5b7/1DyFK2axWwpHUMvP1NODzwLNmEhYX4PsypeRM3ZTYE4mJoO/NaaSy5ft5unj4hGebJrnFEfBUl2ZveOe3F6ULyYIfqakzNMDkXObcPF+0slgFaJhQTXkzNaSgTX+ksne9lXrWF/Kru/W1WjpQwwcyIJar6xRiHz3ir/35ZiYLC/enO9HQCwZZdKqsZLU4JCo1tkOCG5yh393zAPiWkP2SH2dDZQp3FW8ZxGdVhKknUIfBeH31Rhs5BTsayy3ogQrXKrH1Sx8= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AqWZdIdng8aJxcGGCJ+JrVep04dUekgQ5eoIIFAHsoaV2hm6aZ0rGTHFd16rWz9CCZ1CIV8p4/eD2hv3QQp3lne/mAGSSVcUPdM89TjHc92fZEB5eotpuFxLpIMWjUuU0l1N+W1FcPgmIPVpLc1BALy3S54kRYezhsfNaoe6aYy9xpwT8mEsC/teSXJI/i3u2E29aatXVOCbvYHgJyP61doSD7cjlEGGw2GYYntuotk+SG3LJ31A+E39QQpUV2A7NAaoOPxmrebCHE9NLFsBJeQloGeg1pCiixuWrWwkps0pS4M1Q2KeyRs4LyCYDdisgv/Xn36xTYWHObPfmWSGLIAIupiLhb05tjXB9o4Oj8gpqs7q6ZiU1+C955pp+4K25K+4nXJY7dU7p3MS1rIs46wKAU5/3ccftZfNZFsROGxjOnnsskDmrCj+x/On0dLkzDkzYdPfk9Q+p+gXrGT+lScgtuF2pcJF5VcaC/AO9lVMduvHc3gtMCFmB/QlnRJ7WfdrCa4KIvMW8MhktUc4iq55Rw14zlSbtHbuMK7j8pVgxmREyuLrxCtOi6b+3OnNPh07OONPsNl6/n0OfOr2R6u9J0wVoLSXAcZoIm4Jx1A63ETKPvPJtEnRzFQ7DmDm8jg8pwdOqDR/ZSrAV5hkemQm+mwXZEew13hWa5rsLuU= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XPGtgEFjII8uX0YSk6nZhsZZAd61mARDdv7UqdFn0BGZ5AfihhWPVmyNSIZy6QsLbkpJiZxQwo0vw+3ZoMfiN2sEX1V+lC35X69VZ2UFVB1AegsHGE4NmpVJAlZthotFwcbHjJTyaU1y0eNwo3WXowPk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bC6F8Vkq6tD+kX9AslMIlaDaweLKVSAlD/+ZNl/03Htfnmlwy5rM2pACF1wRgdYjiot/LPBvyBazbO52Q41QRMcKxpPdHct8mO42t/Q77DbN6WNFju51TXIsxlK X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88124dfa-72e4-411d-37e3-08dac9da2159 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2022 02:59:52.8238 (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: DU2P250MB0127 Subject: [FFmpeg-devel] [PATCH 5/7] 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: HsYimMN0tVi/ |
Series |
[FFmpeg-devel,1/7] avcodec/pnmenc: Check av_image_get_buffer_size()
|
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 18dfde0e24..f42ef73b37 100644 --- a/libavcodec/flashsvenc.c +++ b/libavcodec/flashsvenc.c @@ -199,7 +199,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(-)