Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1042)

Unified Diff: libavcodec/allcodecs.c

Issue 9317107: FFmpeg merge diff after patches. (Closed) Base URL: ssh://gerrit.chromium.org:29418/chromium/third_party/ffmpeg.git@master
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: libavcodec/allcodecs.c
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 06b872ce52bae44fc70ada84f546aa616e453eff..83fab259be46a6e71a6524cf956c18b881473394 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -45,6 +45,15 @@
extern AVBitStreamFilter ff_##x##_bsf; \
if(CONFIG_##X##_BSF) av_register_bitstream_filter(&ff_##x##_bsf); }
+#ifdef PTW32_STATIC_LIB
+#include "pthread.h"
+static void detach_ptw32(void)
+{
+ pthread_win32_thread_detach_np();
+ pthread_win32_process_detach_np();
+}
+#endif
+
void avcodec_register_all(void)
{
static int initialized;
@@ -53,6 +62,11 @@ void avcodec_register_all(void)
return;
initialized = 1;
+#ifdef PTW32_STATIC_LIB
+ pthread_win32_process_attach_np();
+ pthread_win32_thread_attach_np();
+ atexit(detach_ptw32);
+#endif
/* hardware accelerators */
REGISTER_HWACCEL (H263_VAAPI, h263_vaapi);
REGISTER_HWACCEL (H264_DXVA2, h264_dxva2);

Powered by Google App Engine
This is Rietveld 408576698