From patchwork Wed Aug 7 15:58:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cai Eaphone X-Patchwork-Id: 50927 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:d7b2:0:b0:489:2eb3:e4c4 with SMTP id dc18csp478468vqb; Wed, 7 Aug 2024 08:59:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUNg5r4rTXZ3cLhzIF40yH+bBZ8aItj1SOVLVZjHLMubyCasNYrlUnlJ0ZixRBlP1pWudfaMDExvki7sj8G2PwOsmsdjXTO4wVGPg== X-Google-Smtp-Source: AGHT+IHUL4mIN9EdlgNmjHWsKC+HxxvmmDg5yJ5BSKuKMBvon4K1n/l4f+WUOZNKFxjuRyDY1TYe X-Received: by 2002:a05:6512:220b:b0:52c:c5c4:43d4 with SMTP id 2adb3069b0e04-530bb3b0f68mr13568266e87.53.1723046358484; Wed, 07 Aug 2024 08:59:18 -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 2adb3069b0e04-530de435764si431470e87.12.2024.08.07.08.59.17; Wed, 07 Aug 2024 08:59:18 -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=@hotmail.com header.s=selector1 header.b=rFmtK7Hw; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9AF4268DB15; Wed, 7 Aug 2024 18:59:08 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazolkn19010003.outbound.protection.outlook.com [52.103.43.3]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7133568DB2F for ; Wed, 7 Aug 2024 18:59:01 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mUIWg1TM9/jeJT/RQ5Vgxx7VFyWRhYySTpjupkJSqgIeRetSxYSp2ryoa5k9/KixbChrnoYRcJy25NZ9j5cHuZ6qAReLZGMfLfzMltw/vl44LiinSzymiIvwoQzbUK/Xw/eDsUT3udTKbcY+WikOaqBJNJvfAcT7Ijj4IFs0ypI8nKsIROvOL5owmaRrmYOUoGm5d7DNz8nXBain1MwUh0LnfV9pE1MkzhIm8mowrG/2DuRvI5seU9djEq/TNXQMrN4+/gjDtpopYm2/1hYfRXSmhUHKR6rqYBn0F5fhLTOSHVPpxYZa6RwrJPAUc/WRb8XG4kkhPSDUqU1oMUKgcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=AbfEv9VKEhMOqmlix5Rz0ue8UlkKrj/Zuvq5jblhqec=; b=vMkm9f0VrC5quv4/XSs1mjyKTPDR6wFPqivKOFeCfIME31GZxxx61XgDxu8n37FZ8eDCt/8Bc+tGujMOLHHV/nP7pCBarAnJHJto4tT9zKmIug+JCzgqZX18RxOEgPKOxKeppizNkZdt4LaAi2IsPe5EK9DSsWrIKEUhKkDOvA5BPLhtgnuxRKVfyHqnVyi5Td7QqBd5CEMYO7xBIER9qUaEOs6mw6zyf4HrNFvGliVqtIfkGCztoSnP+a6SSJ7ybOv8YaCCIUNxHi8U2bU+MtquvPyambcZHHDUi2+mZzasswV73AUOfVfL1hA83XhUmEi+ico8Cvd19+K4HoZeEw== 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=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AbfEv9VKEhMOqmlix5Rz0ue8UlkKrj/Zuvq5jblhqec=; b=rFmtK7Hw3KK6RdKWTtUlfZo/9vinE7I92xYbFE7D1z6kfrsiB9BF/t390KxhDDrRWYsjI8VWAo/jVSnHdeWeR0ogGNZ7CzqiNCfMIXJsLzbaj1mPbIXXEOnPu17mVyZ5wGBDqx3km57YC4ulG7aQmRPqaSveJeWnmPZ93eDobbGYyREQmriq7reV4CIZp2klX2QtiJ/dDDZBCTBpBGHY+LzLZCKY/5MKdmOkyVL6WCj9efAcraRnRdDGxAY10D+sdUuppbXDkX55f3a3Nr8CkAsOAK/F70xLvlD6anH2XRvLqSBaxT8Xuxw/ZNd0R1xAuPhRoE+JSqeQlGyRYW1C2Q== Received: from TYAPR01MB3277.jpnprd01.prod.outlook.com (2603:1096:404:83::18) by OSZPR01MB8645.jpnprd01.prod.outlook.com (2603:1096:604:18e::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.13; Wed, 7 Aug 2024 15:58:51 +0000 Received: from TYAPR01MB3277.jpnprd01.prod.outlook.com ([fe80::c9f2:8249:65d9:d0b0]) by TYAPR01MB3277.jpnprd01.prod.outlook.com ([fe80::c9f2:8249:65d9:d0b0%3]) with mapi id 15.20.7828.023; Wed, 7 Aug 2024 15:58:51 +0000 To: ffmpeg-devel@ffmpeg.org Date: Wed, 7 Aug 2024 23:58:07 +0800 Message-ID: X-Mailer: git-send-email 2.45.2.windows.1 In-Reply-To: <20240807155816.1412-1-cyfdel@hotmail.com> References: <20240807155816.1412-1-cyfdel@hotmail.com> From: X-TMN: [OjzMtfJIXGolJrFSublO6q1KE43SAgW2] X-ClientProxiedBy: SI1PR02CA0042.apcprd02.prod.outlook.com (2603:1096:4:1f6::17) To TYAPR01MB3277.jpnprd01.prod.outlook.com (2603:1096:404:83::18) X-Microsoft-Original-Message-ID: <20240807155816.1412-2-cyfdel@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYAPR01MB3277:EE_|OSZPR01MB8645:EE_ X-MS-Office365-Filtering-Correlation-Id: 4a0384ae-a1c7-47ce-db70-08dcb6f9d389 X-Microsoft-Antispam: BCL:0; ARA:14566002|5072599009|8060799006|19110799003|461199028|3412199025|440099028|1710799026; X-Microsoft-Antispam-Message-Info: b5YllIC9Sx/dU0l84MfSAZkHbNUxlFr1iOgn0QKSrO+H2lQ5YKbll7Yzkj268Acu2NpiIIThkbBc7pwsFUV2Kku8oaQ7eqhV/wFwiKNWOnw4b0u+VRVGVzFzJLGYLf540nTsmnzAdlPWqByzd13rNiZ8SMGM06CVovoi/GHGlVMQKmCd59lk9uFG26jDGc2+n6D+stUARVAyza8VGc32dYDSqk8SBiDjp/xLAvHnRXiTkcVKJFkMPfeeji6j6wtPI8H5QtIJUYSPoTbeF3wOKvwe+jiexzM9C6x2/4yj44z6d/R61wQ1gf79jWK727XYlSJCt9TfRio67kx8qyZrhQGcrzGkNdn9mJOu4nkzV3IN5SOUbpHi6iqZ8z3KBHRA//FMbf6Cn3eYjezUfcD8ud7a6kVvIEknSue8USe+lDL1hKCN11YrcqjXBgfiTa3gnTJbbIwxIZPuy9N/l6QgAQKju7IQC3Zdjy8zwd2z2boEsRWVkAcRCt/dX4yK5RcORunVBOCqtWyk11W7phtKSFd10YYgnqp1tpDAE9bIqsoxDpYhwUw5hmkjIixGheUTsS8y0J+wgpZINj/W0khc3ldCxz0LScPwWeIvHpB6wPEEuUa4GWYoIwOmbIQdfkYe6vDmE+4QmfLBscz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HJkPgtoUzYXKxuMZBVAB6QyyxI7yj8irTJx35tU1vLqf0hRicobVpI81Nrw+7I6/rj0YzuojKsJMUvnSFHfrfQDcsW9IHqEfU1dCH5u425Hf6KXAez+3b+XCdZxwEHUClzvc87ySm5ADWue3OsWxQtpIjDwj45mciMCZTq8QX2VH6a74lYbfAV7NS46RDE39EYqyPjOwsy2awZyTdV0mkMHP515jmVpvXEV++1EEKcUEQTUYy6jEr+AtJWLo3q8WkHQSDxmvBevsqtxgKV0WXNH6SfoauB0YgJ1T7+kczhWJKf32rAigh/yocChjgfcM= X-OriginatorOrg: sct-15-20-7719-20-msonline-outlook-15995.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 4a0384ae-a1c7-47ce-db70-08dcb6f9d389 X-MS-Exchange-CrossTenant-AuthSource: TYAPR01MB3277.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2024 15:58:49.5208 (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: OSZPR01MB8645 Subject: [FFmpeg-devel] [PATCH v1] libavdevice/gdigrab: change hwnd tail check fail logic to !=null 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: eaphone Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: qoE0mS+rzF2Y From: eaphone --- libavdevice/gdigrab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavdevice/gdigrab.c b/libavdevice/gdigrab.c index c91661c556..08a41c304b 100644 --- a/libavdevice/gdigrab.c +++ b/libavdevice/gdigrab.c @@ -281,7 +281,7 @@ gdigrab_read_header(AVFormatContext *s1) hwnd = (HWND) strtoull(name, &p, 0); - if (p == NULL || p == name || p[0] == '\0') + if (p == NULL || p == name || p[0] != '\0') { av_log(s1, AV_LOG_ERROR, "Invalid window handle '%s', must be a valid integer.\n", name);