Initialising a video inside void draw()
in
Core Library Questions
•
1 year ago
I'm looking to play a few videos inside void draw. These videos are going to be created after void setup, so I can't initialise them first. To simplify things, I've taken the basic play movie example and swapped the video initialisation into the void draw. This is pretty much how my sketch works. I get this error message and the video doesn't seem to play.
"java(1109,0xac0b62c0) malloc: *** error for object 0x130d950: double free
*** set a breakpoint in malloc_error_break to debug"
when the simplified code is:
- import processing.video.*;
- Movie myMovie;
- int counter = 0;
- void setup() {
- size(350, 260, P2D);
- }
- void draw() {
- myMovie = new Movie(this, "drawing"+counter+".mov");
- myMovie.play();
- image(myMovie, 0, 0);
- }
- void movieEvent(Movie m) {
- m.read();
- }
1