From 1f29aeebe998e1d0e3b613cab6074cd723c0fc1b Mon Sep 17 00:00:00 2001
From: Brad Hards <bradh@frogmouth.net>
Date: Sat, 28 May 2022 20:45:09 +1000
Subject: [PATCH] ffmpeg: pre-load required files in integration tests

---
 .../java/org/jmisb/api/video/VideoFileInputOutputIT.java  | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/api-ffmpeg/src/test/java/org/jmisb/api/video/VideoFileInputOutputIT.java b/api-ffmpeg/src/test/java/org/jmisb/api/video/VideoFileInputOutputIT.java
index 875f5aa3e..5b34408d6 100644
--- a/api-ffmpeg/src/test/java/org/jmisb/api/video/VideoFileInputOutputIT.java
+++ b/api-ffmpeg/src/test/java/org/jmisb/api/video/VideoFileInputOutputIT.java
@@ -8,6 +8,7 @@
 import java.util.SortedMap;
 import java.util.TreeMap;
 import javax.imageio.ImageIO;
+import org.bytedeco.javacpp.Loader;
 import org.jmisb.api.klv.IMisbMessage;
 import org.jmisb.core.video.TimingUtils;
 import org.jmisb.st0102.Classification;
@@ -49,6 +50,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 /** Integration test for {@link VideoFileInput} and {@link VideoFileOutput} */
@@ -63,6 +65,12 @@ public class VideoFileInputOutputIT {
     private final byte version0601 = 11;
     private final byte version0102 = 12;
 
+    @BeforeClass
+    public void loadPresets() {
+        // See https://github.com/WestRidgeSystems/jmisb/issues/403
+        Loader.load(org.bytedeco.ffmpeg.global.swscale.class);
+    }
+
     /** Video stream only test */
     @Test
     public void testSimple() {