Message ID | HE1PR0301MB2154E897519F994A48B4C01C8F769@HE1PR0301MB2154.eurprd03.prod.outlook.com |
---|---|
State | Accepted |
Commit | 6e8e9b7633d8b755e7a464a10ba5047f31cbd84d |
Headers | show
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id EEE3B448B03 for <patchwork@ffaux-bg.ffmpeg.org>; Tue, 6 Apr 2021 08:36:03 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C5500689805; Tue, 6 Apr 2021 08:36:03 +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-oln040092075098.outbound.protection.outlook.com [40.92.75.98]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 85D6B687F21 for <ffmpeg-devel@ffmpeg.org>; Tue, 6 Apr 2021 08:35:57 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EipD624aO9nRl1sDM+pjDU2Z6tbdCT5OuAglSTiDzBK2+wAmvzn859+IWHAP3lg/TeO5eaP+Pb/Ga43xTXMiHkfC4iA/ASwDWU0r/8HlDgQd8camQqJzoR5KEqytXuEZCUhHDvAKnWReck4QZ9599CHlHRJukxDWkHto/pS0Ek/BfYwEiJ8tfCLrM2xEtiuLBqxjbnz3EvOEF5IrWYxn/40KqpSVvK3h8XoLhZxoNTDpVJUrV4QX6o+NI6+pE/wNUDtTQ1RYa9B9LB+kPc/ugEorUDpIgZ8bHgd+TzewL+gbFRmX3BeLZUE+CMyrnkSwCyn6fkzQa+E3DIbQczx9Ag== 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=W3IEizyjIWsN68I7zvj811RkPPlJM3lSlybxuG3nkv0=; b=A8UE9maUFUFzFFP7q9lQ74z+EF6rshFHgyJPnwEPu33ArXJ6acOgUPku9/tw3LWqFEQ/0L1E619oxwilT5yeDmOK4P0EKydaHV84RDuCXZKKxqwVq0lDMEUQcPaP+LLLifkNhLo8xl3Gg6THwPFIn9v2kOf/ly8JawDsNk+O7I0wY8r0I8gHri9DegQQzYV7yPUkBLerYJkRuTGnFnpflE5RCJTr4N071+ftSt+lZ/BH2xjhHM9vnJYwDBOIEI5X7U3WxUZoV8SAAUMhD8APjY1TyVqtACtuz2UkH4nfFnkzWADeNEXYOZXgjCr/jmA6XSWXLkvZ2RAdoWgS3c0nSw== 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=W3IEizyjIWsN68I7zvj811RkPPlJM3lSlybxuG3nkv0=; b=dJoFaFkP+y6WzP8jCj60/3ecU5+UEhL0+f7urz1IbQ01iJszw0s5w8P0QBdt3KLtAeYpyV7TwsXzKdsq5PP3wVTpPb/q243VQJI9tcMuqPw14FXnHlnvkHN0XvfoCweQbV8UYR75eydBh+9IswDPXiDt5knZ3XkgFSpDyJ7y3uH6pmNg/Lm0xzUgIroUR+pqg+/d0HQ/OKeQrQQIbh7ckNcwwjQ5DF1ahJN15W0L8osncRfocy8Wfq+pwbST8b48OLWVgbtNmjmCiiRWEY460/AfOfWLQrgdjWywH0AXja8NKDiRQIVNKkoCynCWUmbmas6LKodetYkT9RobsgBt0A== Received: from HE1EUR04FT014.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::53) by HE1EUR04HT185.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.28; Tue, 6 Apr 2021 05:35:56 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:7e0d::48) by HE1EUR04FT014.mail.protection.outlook.com (2a01:111:e400:7e0d::164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.28 via Frontend Transport; Tue, 6 Apr 2021 05:35:56 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:B6AAF96F144971D58D0989EADA1588F09CDBC87B57E3B8AC0169653A00D905D6; UpperCasedChecksum:504EEB7D176D5D632046CEC61405FA0A229B3BF769336560BEBD77B4A07C5D11; SizeAsReceived:7394; Count:46 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::8128:5de5:4e94:9a21]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::8128:5de5:4e94:9a21%3]) with mapi id 15.20.3999.032; Tue, 6 Apr 2021 05:35:56 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Tue, 6 Apr 2021 07:35:38 +0200 Message-ID: <HE1PR0301MB2154E897519F994A48B4C01C8F769@HE1PR0301MB2154.eurprd03.prod.outlook.com> X-Mailer: git-send-email 2.27.0 X-TMN: [oMxtfaQMktYfm2XWYWyRxT5NGlO/Rm+t] X-ClientProxiedBy: AM3PR05CA0145.eurprd05.prod.outlook.com (2603:10a6:207:3::23) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210406053546.451969-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.96) by AM3PR05CA0145.eurprd05.prod.outlook.com (2603:10a6:207:3::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.27 via Frontend Transport; Tue, 6 Apr 2021 05:35:55 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: eba3c936-5de5-4cc9-d326-08d8f8bdd98f X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSbyvoxwwqtt9ZF5aXTIDASvIDv4cRUxy9L1PKUQ7/whDszniCdNy5hzanRo6rlb1Rm22IzODpwJo7fnDWH+Vbcp0qTHDUh1IKaB3MBSgGERM3/yytDCcKueV/7Thi1GMafkBM+YJKE7fKx4oAghJUKUo41B3gX5tpQXZP0gQX6UIyUgIjY5IT4ZD9G53L4eHTfTx9Q1dhvDan8/36EnIClmUmmgB1gRNFc2wnU7QivRBC1oJJl0Id0vQNUNrDl2h2UcEfWxoCSL6N+aB752KdfhQor5y/sVbYsWD5RLdu/2ScpgrBCvO4Wc4Zo4Fr9i7q8wzEQcDBBXvpCW+62z7+KldhzCliei4+YYMkZ6Vnq4CA378EcyToNtSBDhLpw9FLrHSvvBe4DzbXJdsVaep4emNvUYIX/LhEcgYwugNKbRI23HvKGHs9BPX225p9PPRw+/IW5R5s3LqVeL0Bnb1VKLJh+/C7eovuMXGk6JwXdNJ88kZimzWn8psch4H75DDVsgtBJlm174kx2eEN++rHfFcmzhhHKufm5IMb6lFwqFRelq0diWl/dh+iy7mvJOROLNJI3YmuAw6mLUCLISb324I3f58hVFC81tbeHtAdZMv3X/TLjZ+1siwSCIvCKwCchxEw07TToayjsS14f0ZFhgvoKB/7j+2kNrQhJH1KKniVvhYvg7ECb+OR67L74SqrWOlv+QGXXEELIjX93rX2UQX8BoDaa7YpjlE3QtKeVKvDtug3qB1ampYdHqmEv4ns= X-MS-TrafficTypeDiagnostic: HE1EUR04HT185: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pdCIXkWg07TwhTJLx/o/BuACbM5PM9Cviz3PZOA0mUCerS7h3mPMFkiko7gAQj+LRpWtsigEdseSa/2Oa142V3QzII632/KMQ8eFlvEUc1gTjlajEPZdzLFumQh1M5DC+CygacOrfYJGrPU13Dg4iUNRv8V7yg1q0ITl5b3n+VRxApWdQv7T5U3VQvHy1ilZOZofiIahqUDUxAyNGBb73V9n2awctl5E31y49PL15W3cQsj6/4ui6LosGHI/HP/6471ttkSAjaNn7s2b0W6H4KQXJtITiQJ+dE+RQbzUXHxwFRrhqHJxpJOmbDcCcGBpP3IrwSH+GcVT/0luhFSKkmHa8pf8+BGixN0dv14Gufe7XFxZFcekS0DTyNyU9DDO0NgGH6nQSIzY12SjqvX/wA== X-MS-Exchange-AntiSpam-MessageData: j/hQ28sEoEUBlEDx0vmfiEebiGNZPK/nd5IfW6iVS88gFkaWt95/NcJz0r3eWAwUnPAZ+zpPegBUESsf39CAl/2GJ7W6oM8xahcO/mWpWQdF5omkE491Ni0TpfREqlRdsUU8zEc9lUU7jTnNSRYxmA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: eba3c936-5de5-4cc9-d326-08d8f8bdd98f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2021 05:35:56.0621 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR04FT014.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: HE1EUR04HT185 Subject: [FFmpeg-devel] [PATCH 1/9] avcodec/encode: Fix check for allowed LJPEG pixel formats X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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="utf-8" Content-Transfer-Encoding: base64 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> |
Series |
[FFmpeg-devel,1/9] avcodec/encode: Fix check for allowed LJPEG pixel formats
|
expand
|
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
diff --git a/libavcodec/encode.c b/libavcodec/encode.c index a93bb3ccf7..89df5235da 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@ -565,7 +565,7 @@ FF_ENABLE_DEPRECATION_WARNINGS if (avctx->pix_fmt == avctx->codec->pix_fmts[i]) break; if (avctx->codec->pix_fmts[i] == AV_PIX_FMT_NONE - && !((avctx->codec_id == AV_CODEC_ID_MJPEG || avctx->codec_id == AV_CODEC_ID_LJPEG) + && !(avctx->codec_id == AV_CODEC_ID_MJPEG && avctx->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL)) { char buf[128]; snprintf(buf, sizeof(buf), "%d", avctx->pix_fmt);
The pix_fmts of the LJPEG encoder already contain all supported pixel formats (including the ones only supported when strictness is unofficial or less); yet the check in ff_encode_preinit() ignored this list in case strictness is unofficial or less. But the encoder presumed that it is always applied and blacklists some of the entries in pix_fmts when strictness is > unofficial. The result is that if one uses an entry not on that list and sets strictness to unofficial, said entry passes both checks and this can lead to segfaults lateron (e.g. when using gray). Fix this by removing the exception for LJPEG in ff_encode_preinit(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/encode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)