Skip to content

Commit

Permalink
* Fix FFmpegFrameRecorder.record() incorrectly flushing the video …
Browse files Browse the repository at this point in the history
…codec on data frames (issue #1858)
  • Loading branch information
saudet committed Aug 4, 2022
1 parent 0e7cd33 commit 32f5fed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Fix `FFmpegFrameRecorder.record()` incorrectly flushing the video codec on data frames ([issue #1858](https://github.com/bytedeco/javacv/issues/1858))
* Improve accuracy of `FFmpegFrameGrabber.setFrameNumber()` ([pull #1851](https://github.com/bytedeco/javacv/pull/1851))
* Add `FrameGrabber.resetStartTime()` to allow `grabAtFrameRate()` after operations such as seeking ([pull #1846](https://github.com/bytedeco/javacv/pull/1846))
* Add `FrameGrabber.videoSideData/audioSideData` properties and `FFmpegFrameGrabber.getDisplayRotation()` for convenience ([issue #1361](https://github.com/bytedeco/javacv/issues/1361))
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/bytedeco/javacv/FFmpegFrameRecorder.java
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ public void stop() throws Exception {
record(frame, frame != null && frame.opaque instanceof AVFrame ? ((AVFrame)frame.opaque).format() : AV_PIX_FMT_NONE);
}
public synchronized void record(Frame frame, int pixelFormat) throws Exception {
if (frame == null || (frame.image == null && frame.samples == null)) {
if (frame == null || (frame.image == null && frame.samples == null && frame.data == null)) {
recordImage(0, 0, 0, 0, 0, pixelFormat, (Buffer[])null);
} else {
if (frame.image != null) {
Expand Down

0 comments on commit 32f5fed

Please sign in to comment.