I am currently writing an application where it can display up to 12 monitors of live video streams. The problem that I am currently facing that when I start/stop the application sometimes I get a java fatal error. After searching about the problem, it seems that making multiple calls in quick succession to libvlc_media_player_play causes a crash, according to the VLCJ website: http://code.google.com/p/vlcj/wiki/Mult ... rInstances. There is written the following:
"The VLCJ bindings are generally stable and hard crashes in the Java Virtual Machine due to native library failures usually don't occur.
However, when using multiple video player instances the chance for instability and hard crashes increases.
..., when there are up to three video player instances everything is still stable.
However, with more than three video player instances there is a chance of a fatal native library crash, apparently due to a race condition during start-up. If the race condition does not materialise then all instances will play videos correctly.
These crashes occur in native libraries and there's not much that VLCJ can do about it.
The main cause of failure seems to be as a result of making multiple calls in quick succession to libvlc_media_player_play. It is possible to workaround this problem (to some degree) by staggering the play calls (e.g. with a one second delay between calls)."
I did try the workaround (showed improvement, but still it is no guarantee that it won't crash), however having 1 second delay between the calls is a bit too much and it doesn't always work.
I am wondering if this is a known problem and the VLC-team will attempt to fix it in VLC 1.1.2?
And is there a command-line parameter that can be used to avoid this problem?
Thanks in advance for your help..
![Smile :)](./images/smilies/icon_smile.gif)
Gr.
Ahmed