From 0244b1e495b6e51fddc4868dc3e454965d4e0bea Mon Sep 17 00:00:00 2001 From: Lwine <1191286779@qq.com> Date: Wed, 17 Apr 2024 19:54:37 +0800 Subject: [PATCH 1/2] bugfix memory leaks --- src/main/java/org/bytedeco/javacv/FFmpegFrameGrabber.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bytedeco/javacv/FFmpegFrameGrabber.java b/src/main/java/org/bytedeco/javacv/FFmpegFrameGrabber.java index 766bcda9..2bc85294 100644 --- a/src/main/java/org/bytedeco/javacv/FFmpegFrameGrabber.java +++ b/src/main/java/org/bytedeco/javacv/FFmpegFrameGrabber.java @@ -280,7 +280,7 @@ public synchronized void releaseUnsafe() throws Exception { avio = null; } if (oc != null) { - avformat_free_context(oc); + avformat_close_input(oc); oc = null; } } From e6c034fb9df281e8d8561d0bee77dbdec39909d1 Mon Sep 17 00:00:00 2001 From: Samuel Audet Date: Sun, 21 Apr 2024 11:31:19 +0900 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b72bc90a..ba777193 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ + * Fix memory leak in `FFmpegFrameGrabber` when decoding from `InputStream` ([pull #2214](https://github.com/bytedeco/javacv/pull/2214)) * Upgrade dependencies for FFmpeg 7.0 ### January 29, 2024 version 1.5.10