From patchwork Sun Oct 30 23:41:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 39053 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8e01:b0:a3:a294:714c with SMTP id y1csp602714pzj; Sun, 30 Oct 2022 16:41:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7lAGA518MEziyJEYUv83n67vi0xt/oQ0I3oZoir66lVSTjRIPBmf2KUyXGZIoQlzfpk6ux X-Received: by 2002:a50:d098:0:b0:462:e887:64ed with SMTP id v24-20020a50d098000000b00462e88764edmr11245660edd.198.1667173316691; Sun, 30 Oct 2022 16:41:56 -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 dz19-20020a0564021d5300b0045c2e7e5532si6240277edb.585.2022.10.30.16.41.56; Sun, 30 Oct 2022 16:41:56 -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=eXiIZDQ7; 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 82D7D68BD70; Mon, 31 Oct 2022 01:41:52 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2019.outbound.protection.outlook.com [40.92.91.19]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 644D868BD5B for ; Mon, 31 Oct 2022 01:41:46 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lBlHZVCsoPtMBnNVieJI1n3VsZlgFFRvZZiCYpBwi+k6NjaJ0djm/eDBy8rqp+m2cxF7veF5U5vSCvt1FkHYRLKhmD/jLJKK0nptvZ6RGSkb4zraLlX6olNRRDdhAOVRHQ6lcyz18tl0qFjw7vHZjJ7rs1CqaZwmBNK7vQB4Cv9TP0o3FawI6SAhkPWHYzVn8AtXafx+W7OYyAjH/E8mMu4svjS8f900Qub6Qxx2KcNWqss5zh3GSWQQpe2HpbgmwjjXjJ0ovhVMy6Oj6QxMDfofPHW3+A9Sxa0FBXl65EhCtbBX2/vogu0FMVXbul4JiG8sB9qsGsgshyFN+aev1g== 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=LoerbRKDVLfx2EXlLG2qK0IS5HwHUyd1G7dqafQsjCY=; b=LXVQLUVzmYjymeWzJOcnouco9hugT/qTQ6EU6L4uehHdIKiJmDWkb2Cjt7BTeYcs6R29dMb9yZWrV+B+hYf1WofBuGSQ0pZbg3pEaG+kQloelYpcR7eouNLUlsIiUWQpWVtpCQuzEXzWjbl2W44VFfOKW5RetNU+Hw7+2Onxyi7oYy/9TxtcdPuXJKf7E9v4LG0Yt22YjHDt9LlVs7ihQSfecMWk2uTsaBxI+OM+yspmM1KaWGhW8qB7UsJVlYnSg3dtxMWKf8AYZlQkO8/IoOV2uMAyVpuVzpzSHawgwd/aXSxu82q7IG2e2882sRqmBnK7EI5pcfzJW/DWHMsRvg== 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=LoerbRKDVLfx2EXlLG2qK0IS5HwHUyd1G7dqafQsjCY=; b=eXiIZDQ7oS5JhaTJXz82+PNjYwkLcElzMy/pc1zgtkJeT9R2aApz4MOk5ZD1PdKLtOi6TjPIy3daXZbNVho14J43irK8aDO3BIl0lkloqkaiGty0zq79pEYvfNbxpB/62hJnPpUzSQyAZLrYTVd6ygz1xfnX18HrEu91zw/0o8+bwGJbPLPqNaZqnDjW2GUWB6g2rYpwo31egBXQEWVHECL4E9AgCYKCsK7etxMLQV/QsPVNAcD2IvlRT7Oz8Ac5/tKjW8sL0PfP9kduRIMLY0QGiKv82gC85O9FOYlbHXD+kmDUEuh4666c9mLpJhEzJFND2s00SWr0U0FLrDEFWA== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DU2P250MB0351.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:27c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.15; Sun, 30 Oct 2022 23:41:44 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::739a:8740:19c5:925c]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::739a:8740:19c5:925c%5]) with mapi id 15.20.5769.019; Sun, 30 Oct 2022 23:41:44 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 31 Oct 2022 00:41:31 +0100 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [2o7KuqcDUyikkGNf8PgX1S/XMZaHlqOMIB4VGaXFK8I=] X-ClientProxiedBy: FR0P281CA0148.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:96::9) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221030234149.10868-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DU2P250MB0351:EE_ X-MS-Office365-Filtering-Correlation-Id: 03efb459-c4c1-4868-39fa-08dabad04d37 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nN7ksDdJHhaFM91iprChLhiCTmUit7X8ZZPvuCD1N27RFJIfvnYAuWI9PsgWGQEoGmxLdF4zwrywmbC8GtcT13n+gJNqSlMG2DCYD+eNJC4lvK9yT+qWBmHUs1F9R7eYZuuwK7boC/5rza6yGu6GO6p+jMhgyyqTpK6xx2wvN21oLE/VrUSSZVsV91bpblrbIlq9dOsjHaz21Di5yVzkMFLc+sW8s7krVyHyvU7UJz9ODoehMh1z2wqzzJ/dKqYmqdtQ1kb/LuHJSHxw8D9XpmB0YzmtHSI7wh3jnxIBfgjt1CwBBCAe0mgxuHpxBM4HBEIuUWMpJbcmB1fBz5JSwnLrSUNc+RJ8OfW+QdO0hUZ+UDirI3NQgkk4OqK03CPId+hMmvg6dgVClvEPlNjJNYEqWfUUQKJbtSFLfqpEDN5BAzhoykagky0Pen1D0MERtlAi1NdOvtFVvUi6KcGDb38I4MFej3fX25qxAxi6cOYrync1oPOnlQ4cSJzWbkwB3fiNIlCNc1LYq6h8Lq5HXCoGR2lG7j2MHs9Tt6hTJH5gDGOx5LRVNp8ShWnkpuS1v3BFHYG1790yw+7MgRKFej5vLKLyS3V8dEBv/jLG8T7oLHSt26bwHGW7ZYbBBTR5xbC/mBW6nnKnXORYIahJ7PdC1ARu0pobjbHey8NoBt2lpmbc1YF/72d0oiMZSLTuVQS5ZONFnD3Mm2C1fmj6jVTXqO15wE6KqUX1gu7EG9mOIxae6jpCSAfL8X7r/RNqR2tDTT9qEFTbXjYdkycgNb X-Microsoft-Antispam: BC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Network-Message-Id: 03efb459-c4c1-4868-39fa-08dabad04d37 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2022 23:41:44.1055 (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: DU2P250MB0351 Subject: [FFmpeg-devel] [PATCH 01/19] avcodec/vc1: Don't check for AVCodecContext.codec 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: lt8m+Qg78Mxd This check has been added in c617bed34f39a122ab1f89581ddce9cc63885383, merging ee769c6a7c1d4ec6560f5e5a6f457b770b10fb33 to fix a possible segfault if AVCodecContext.codec is not set as it may be during parsing. While this fixes the segfault, it has the unfortunate side effect that it makes the output of the parser dependent on whether a decoder is set (and ultimately available). The fix later applied in 5d2be71b9ecf2a88752666a2c4039f4d98419d35 does not have this downside and makes checking AVCodecContext.codec superfluous. So remove this check. Signed-off-by: Andreas Rheinhardt --- libavcodec/vc1.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index c9257b290f..f6de8b9e75 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -632,8 +632,6 @@ int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) v->fcm = PROGRESSIVE; if (v->finterpflag) v->interpfrm = get_bits1(gb); - if (!v->s.avctx->codec) - return -1; if (v->s.avctx->codec_id == AV_CODEC_ID_MSS2) v->respic = v->rangered =