javacv icon indicating copy to clipboard operation
javacv copied to clipboard

Error on InputStream.read(): java.io.IOException: closed

Open ulde1 opened this issue 1 year ago • 3 comments

When I use FFmpegFrameGrabber(InputStream) and the InputStream is closed, I only get the message on stderr: Error on InputStream.read(): java.io.IOException: closed FFmpegFrameGrabber#grab then still waits in line 1454 pkt.stream_index(-1); infinitly.

I would appreciate, if FFmpegFrameGrabber#grab would return a null Frame, so I can take appropriate action. Even better would be, if FFmpegFrameGrabber#grab throws that java.io.IOException.

ulde1 avatar Jun 29 '23 09:06 ulde1

Duplicate of #1892

saudet avatar Jun 29 '23 12:06 saudet

That appears to be caused by some bug in JNI, but someone would need to debug this...

saudet avatar Jun 29 '23 12:06 saudet

Could you try this on another platform with another JVM such as Android and see if the same thing happens? If this only occurs with Java SE, this will at least indicate to us that this is an issue with the JDK that we can report upstream.

saudet avatar Jul 02 '23 00:07 saudet