bytedeco/javacv

FFmpegFrameGrabber should throw an exception when attempting to access stream metadata before calling start()

Open

#2,382 opened on Feb 19, 2026

View on GitHub
 (4 comments) (0 reactions) (0 assignees)Java (1,583 forks)batch import
enhancementhelp wantedquestion

Repository metrics

Stars
 (6,985 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

As stated in the title, when using FFmpegFrameGrabber, if start() is not called beforehand, methods such as getImageWidth() will return 0. This behavior may cause errors to propagate downstream and lead to issues that are more difficult to trace. I believe an IllegalStateException should be thrown immediately to clearly indicate that this operation is invalid.

Contributor guide