diff options
author | Sven Gothel <[email protected]> | 2014-02-22 07:48:03 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-02-22 07:48:03 +0100 |
commit | b9e89c35dac3c19e026d2a0161649a065b3dceee (patch) | |
tree | 44ef0a989551124fd6bb0dad3b35f2b0542538ed /src/jogl/native/libav/ffmpeg_tool.h | |
parent | d553668d3c5a687ef626501f4ed5963f16c6dba3 (diff) |
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()
Diffstat (limited to 'src/jogl/native/libav/ffmpeg_tool.h')
-rw-r--r-- | src/jogl/native/libav/ffmpeg_tool.h | 16 |
1 files changed, 0 insertions, 16 deletions
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 <stdio.h> #include <stdlib.h> -// 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 <pthread.h> - #error PTHREAD path not tested yet -#endif - #include <GL/gl.h> 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; |