* [FFmpeg-devel] [PATCH] w32pthread: fix signature of WinRT version of thread worker
@ 2023-05-23 11:23 Steve Lhomme
0 siblings, 0 replies; only message in thread
From: Steve Lhomme @ 2023-05-23 11:23 UTC (permalink / raw)
To: ffmpeg-devel
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".
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-23 11:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-23 11:23 [FFmpeg-devel] [PATCH] w32pthread: fix signature of WinRT version of thread worker Steve Lhomme
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git