aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes')
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java11
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java17
2 files changed, 18 insertions, 10 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java
index a6a6fba97..e7a425a54 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java
@@ -214,14 +214,17 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
natives = null;
ready = false;
} else {
- if( avCodecVersion.getMajor() == 53 && avFormatVersion.getMajor() == 53 && avUtilVersion.getMajor() == 51 ) {
+ final int avCodecMajor = avCodecVersion.getMajor();
+ final int avFormatMajor = avFormatVersion.getMajor();
+ final int avUtilMajor = avUtilVersion.getMajor();
+ if( avCodecMajor == 53 && avFormatMajor == 53 && avUtilMajor == 51 ) {
// lavc53.lavf53.lavu51
natives = new FFMPEGv08Natives();
- } else if( avCodecVersion.getMajor() == 54 && avFormatVersion.getMajor() == 54 && avUtilVersion.getMajor() == 52 ) {
+ } else if( avCodecMajor == 54 && avFormatMajor == 54 && avUtilMajor == 52 ) {
// lavc54.lavf54.lavu52.lavr01
natives = new FFMPEGv09Natives();
- } else if( avCodecVersion.getMajor() == 55 && avFormatVersion.getMajor() == 55 && avUtilVersion.getMajor() == 52 ) {
- // lavc55.lavf55.lavu52.lavr01
+ } else if( avCodecMajor == 55 && avFormatMajor == 55 && ( avUtilMajor == 52 || avUtilMajor == 53 ) ) {
+ // lavc55.lavf55.lavu52.lavr01 (ffmpeg) or lavc55.lavf55.lavu53.lavr01 (libav)
natives = new FFMPEGv10Natives();
} else {
System.err.println("LIB_AV No Version/Native-Impl Match");
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java
index 6121172c8..bbdc6f206 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java
@@ -107,9 +107,9 @@ import jogamp.opengl.util.av.impl.FFMPEGNatives.SampleFormat;
* Currently we are binary compatible w/:
* <table border="1">
* <tr><th>libav / ffmpeg</th><th>lavc</th><th>lavf</th><th>lavu</th><th>lavr</th> <th>FFMPEG* class</th></tr>
- * <tr><td>0.8</td> <td>53</td> <td>53</td> <td>51</td> <td></td> <td>FFMPEGv08</td></tr>
- * <tr><td>9.0 / 1.2</td> <td>54</td> <td>54</td> <td>52</td> <td>01/00</td> <td>FFMPEGv09</td></tr>
- * <tr><td>10 / 2</td> <td>55</td> <td>55</td> <td>52</td> <td>01/00</td> <td>FFMPEGv10</td></tr>
+ * <tr><td>0.8</td> <td>53</td> <td>53</td> <td>51</td> <td></td> <td>FFMPEGv08</td></tr>
+ * <tr><td>9.0 / 1.2</td> <td>54</td> <td>54</td> <td>52</td> <td>01/00</td> <td>FFMPEGv09</td></tr>
+ * <tr><td>10 / 2</td> <td>55</td> <td>55</td> <td>53/52</td> <td>01/00</td> <td>FFMPEGv10</td></tr>
* </table>
* </p>
* <p>
@@ -194,9 +194,14 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
System.err.println("LIB_AV Device : [loaded "+FFMPEGDynamicLibraryBundleInfo.avDeviceLoaded()+"]");
System.err.println("LIB_AV Class : "+(null!= natives ? natives.getClass().getSimpleName() : "n/a"));
}
- libAVVersionGood = avCodecMajorVersionCC == avCodecVersion.getMajor() &&
- avFormatMajorVersionCC == avFormatVersion.getMajor() &&
- avUtilMajorVersionCC == avUtilVersion.getMajor() &&
+ final int avCodecMajor = avCodecVersion.getMajor();
+ final int avFormatMajor = avFormatVersion.getMajor();
+ final int avUtilMajor = avUtilVersion.getMajor();
+ libAVVersionGood = avCodecMajorVersionCC == avCodecMajor &&
+ avFormatMajorVersionCC == avFormatMajor &&
+ ( avUtilMajorVersionCC == avUtilMajor ||
+ 55 == avCodecMajorVersionCC && 53 == avUtilMajorVersionCC && 52 == avUtilMajor /* ffmpeg 2.x */
+ ) &&
( !avResampleLoaded || avResampleMajorVersionCC < 0 || avResampleMajorVersionCC == avResampleVersion.getMajor() ) &&
( !swResampleLoaded || swResampleMajorVersionCC < 0 || swResampleMajorVersionCC == swResampleVersion.getMajor() ) ;
if( !libAVVersionGood ) {