From b9e89c35dac3c19e026d2a0161649a065b3dceee Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 22 Feb 2014 07:48:03 +0100 Subject: Bug 927 - Multithreading (MT) issues libav/ffmpeg FFMPEG Natives: - Move 'mutex_avcodec_openclose' to local static and initialize at initSymbols0 - setStream0: - Add another locked mutex block around: - [ sp_avformat_open_input .. sp_avformat_find_stream_info ] This solves the issue of: [NULL @ 0x89d20c60] insufficient thread locking around avcodec_open/close() --- src/jogl/native/libav/ffmpeg_tool.h | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/jogl/native/libav/ffmpeg_tool.h') diff --git a/src/jogl/native/libav/ffmpeg_tool.h b/src/jogl/native/libav/ffmpeg_tool.h index 66c3519e6..136be2ecc 100644 --- a/src/jogl/native/libav/ffmpeg_tool.h +++ b/src/jogl/native/libav/ffmpeg_tool.h @@ -64,15 +64,6 @@ typedef struct SwrContext SwrContext; #include #include -// We use JNI Monitor Locking, since this removes the need -// to statically link-in pthreads on window .. -// #define USE_PTHREAD_LOCKING 1 -// -#ifdef USE_PTHREAD_LOCKING - #include - #error PTHREAD path not tested yet -#endif - #include typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); @@ -139,7 +130,6 @@ typedef struct { int64_t dtsLast; // DTS of the last frame } PTSStats; - typedef struct { jobject ffmpegMediaPlayer; int32_t verbose; @@ -157,12 +147,6 @@ typedef struct { PFNGLFLUSH procAddrGLFlush; PFNGLFINISH procAddrGLFinish; - #ifdef USE_PTHREAD_LOCKING - pthread_mutex_t mutex_avcodec_openclose; - #else - jobject mutex_avcodec_openclose; - #endif - AVFormatContext* pFormatCtx; int32_t vid; AVStream* pVStream; -- cgit v1.2.3