Hi,
I am using FFmpegFrameGrabber to grab frames from video, then convert them to BufferedImage using java2DFrameConverter. This converter seems to save all Frames converted to BufferedImages to same BufferedImages object. As result, different threads using FFmpegFrameGrabbers with java2DFrameConverter overwrite each other's images. My quetion is - is there any "good" way to prevent this from happening or do I need to synchronize threads using something like semaphore and copy BufferedImages to separate objects, which would result in some threads being blocked? (for example some way to convert frame to bufferedImage that would not save them all to same object)
Will be thankful for any ideas.
The idea is to use one instance per thread. Sounds good?
Thanks for answer. Do you mean single instance of java2DFrameConverter?
No, multiple instances.
Sorry, I meant one instance of java2DFrameConverter per thread. Thanks for anwers, will test it.