diff --git a/CHANGELOG.md b/CHANGELOG.md index aa285e25..07c6392d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ + * Fix crash in `FFmpegFrameRecorder.flush()` for HLS format and possibly others ([pull #1374](https://github.com/bytedeco/javacv/pull/1374)) * Fix "Resetting to invalid mark" `IOException` thrown on `FFmpegFrameGrabber.release()` ([issue #911](https://github.com/bytedeco/javacv/issues/911)) * Upgrade dependencies for OpenCV 4.2.0, FFmpeg 4.2.2, Leptonica 1.79.0, and Tesseract 4.1.1 * Add `Seekable` and `SeekableByteArrayOutputStream` to be used with `FFmpegFrameRecorder` ([pull #1350](https://github.com/bytedeco/javacv/pull/1350)) diff --git a/src/main/java/org/bytedeco/javacv/FFmpegFrameRecorder.java b/src/main/java/org/bytedeco/javacv/FFmpegFrameRecorder.java index 924ec1fe..7793f5a7 100644 --- a/src/main/java/org/bytedeco/javacv/FFmpegFrameRecorder.java +++ b/src/main/java/org/bytedeco/javacv/FFmpegFrameRecorder.java @@ -903,7 +903,7 @@ public void flush() throws Exception { while (video_st != null && ifmt_ctx == null && recordImage(0, 0, 0, 0, 0, AV_PIX_FMT_NONE, (Buffer[])null)); while (audio_st != null && ifmt_ctx == null && recordSamples(0, 0, (Buffer[])null)); - if (interleaved && video_st != null && audio_st != null) { + if (interleaved && (video_st != null || audio_st != null)) { av_interleaved_write_frame(oc, null); } else { av_write_frame(oc, null);