From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id DD9A34574F for ; Tue, 23 May 2023 11:23:53 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AECCB68BFA9; Tue, 23 May 2023 14:23:49 +0300 (EEST) Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9BD6F68B7D1 for ; Tue, 23 May 2023 14:23:43 +0300 (EEST) Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4QQX4n01rBz9sqX for ; Tue, 23 May 2023 13:23:37 +0200 (CEST) From: Steve Lhomme To: ffmpeg-devel@ffmpeg.org Date: Tue, 23 May 2023 13:23:24 +0200 Message-Id: <20230523112324.3084-1-robux4@ycbcr.xyz> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4QQX4n01rBz9sqX Subject: [FFmpeg-devel] [PATCH] w32pthread: fix signature of WinRT version of thread worker 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: The callback passed to CreateThread is not the same as with _beginthreadex(). This WinRT check could be removed if Win8 WinRT is not maintained as _beginthreadex() is now available [1] [1] https://learn.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=msvc-160#windows-8x-store-apps-and-windows-phone-8x-apps --- compat/w32pthreads.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h index 6405e72b64..364eebfe4e 100644 --- a/compat/w32pthreads.h +++ b/compat/w32pthreads.h @@ -66,7 +66,11 @@ typedef CONDITION_VARIABLE pthread_cond_t; #define PTHREAD_CANCEL_ENABLE 1 #define PTHREAD_CANCEL_DISABLE 0 +#if HAVE_WINRT +static av_unused DWORD WINAPI attribute_align_arg win32thread_worker(void *arg) +#else static av_unused unsigned __stdcall attribute_align_arg win32thread_worker(void *arg) +#endif { pthread_t *h = (pthread_t*)arg; h->ret = h->func(h->arg); -- 2.39.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".