aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/native
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-02-05 04:35:51 +0100
committerSven Gothel <[email protected]>2015-02-05 04:35:51 +0100
commit8426f47419bf116b427461a36534e70c48ed930d (patch)
tree263d4a815e7b9aa95568f7de43086a6e14c1bd1a /src/jogl/native
parent06a05d30fc026b21f59310986ea9eb7f3ff30d54 (diff)
Fix FFMPEGMediaPlayer: static init block issue, libavresample debian8 packaging
- static init block issue commit 06a05d30fc026b21f59310986ea9eb7f3ff30d54 used a static final field initialized after the static {} block which was still null if called -> moved above static {} - libavresample debian8 packaging Debian8 packages a libav10 combination w/ libavresample version 2, which actually belongs to libav11 - libav10 uses libarvresample version 1. Allow libavresample and libswresample to be selectively skipped if version mismatch.
Diffstat (limited to 'src/jogl/native')
-rw-r--r--src/jogl/native/libav/ffmpeg_impl_template.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/jogl/native/libav/ffmpeg_impl_template.c b/src/jogl/native/libav/ffmpeg_impl_template.c
index 3077070db..ca283ef52 100644
--- a/src/jogl/native/libav/ffmpeg_impl_template.c
+++ b/src/jogl/native/libav/ffmpeg_impl_template.c
@@ -535,7 +535,8 @@ JNIEXPORT jint JNICALL FF_FUNC(getSwResampleMajorVersionCC0)
}
JNIEXPORT jlong JNICALL FF_FUNC(createInstance0)
- (JNIEnv *env, jobject instance, jobject ffmpegMediaPlayer, jboolean verbose)
+ (JNIEnv *env, jobject instance, jobject ffmpegMediaPlayer,
+ jboolean enableAvResample, jboolean enableSwResample, jboolean verbose)
{
FFMPEGToolBasicAV_t * pAV = calloc(1, sizeof(FFMPEGToolBasicAV_t));
if(NULL==pAV) {
@@ -545,12 +546,12 @@ JNIEXPORT jlong JNICALL FF_FUNC(createInstance0)
pAV->avcodecVersion = sp_avcodec_version();
pAV->avformatVersion = sp_avformat_version();
pAV->avutilVersion = sp_avutil_version();
- if(HAS_FUNC(sp_avresample_version)) {
+ if(HAS_FUNC(sp_avresample_version) && enableAvResample) {
pAV->avresampleVersion = sp_avresample_version();
} else {
pAV->avresampleVersion = 0;
}
- if(HAS_FUNC(sp_swresample_version)) {
+ if(HAS_FUNC(sp_swresample_version) && enableSwResample) {
pAV->swresampleVersion = sp_swresample_version();
} else {
pAV->swresampleVersion = 0;