From fef1d8ee8778dca195bfca35bdf81e9031d2ed12 Mon Sep 17 00:00:00 2001 From: Samuel Audet Date: Sat, 19 Feb 2022 09:33:47 +0900 Subject: [PATCH] * Restore static calls to `FFmpegFrameGrabber.tryLoad()` and `FFmpegFrameRecorder.tryLoad()` (issue #1756) --- CHANGELOG.md | 1 + .../java/org/bytedeco/javacv/FFmpegFrameGrabber.java | 10 +++++----- .../java/org/bytedeco/javacv/FFmpegFrameRecorder.java | 10 +++++----- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d561f6d..60000383 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ + * Restore static calls to `FFmpegFrameGrabber.tryLoad()` and `FFmpegFrameRecorder.tryLoad()` ([issue #1756](https://github.com/bytedeco/javacv/issues/1756)) * Enable by default on `RealSense2FrameGrabber.start()` all color, depth, and IR streams as `videoStream` ([pull #1750](https://github.com/bytedeco/javacv/pull/1750)) ### February 11, 2022 version 1.5.7 diff --git a/src/main/java/org/bytedeco/javacv/FFmpegFrameGrabber.java b/src/main/java/org/bytedeco/javacv/FFmpegFrameGrabber.java index 234c2fc4..4d5c055f 100644 --- a/src/main/java/org/bytedeco/javacv/FFmpegFrameGrabber.java +++ b/src/main/java/org/bytedeco/javacv/FFmpegFrameGrabber.java @@ -131,12 +131,12 @@ public static void tryLoad() throws Exception { } } -// static { -// try { -// tryLoad(); + static { + try { + tryLoad(); // FFmpegLockCallback.init(); -// } catch (Exception ex) { } -// } + } catch (Exception ex) { } + } public FFmpegFrameGrabber(File file) { this(file.getAbsolutePath()); diff --git a/src/main/java/org/bytedeco/javacv/FFmpegFrameRecorder.java b/src/main/java/org/bytedeco/javacv/FFmpegFrameRecorder.java index 1d62aaaa..3a640ed0 100644 --- a/src/main/java/org/bytedeco/javacv/FFmpegFrameRecorder.java +++ b/src/main/java/org/bytedeco/javacv/FFmpegFrameRecorder.java @@ -132,12 +132,12 @@ public static void tryLoad() throws Exception { } } -// static { -// try { -// tryLoad(); + static { + try { + tryLoad(); // FFmpegLockCallback.init(); -// } catch (Exception ex) { } -// } + } catch (Exception ex) { } + } public FFmpegFrameRecorder(File file, int audioChannels) { this(file, 0, 0, audioChannels);