@fakob wrote:
Hi
There seems to be a bug with the ofAVFoundationPlayer. Well maybe I am doing something wrong, but the same thing works fine in of_v0.8.1 where the old player is used afaik.
Using getPixels() to grab a frame of a movie throws an error if there was an unsuccessful movie load before.
These lines works fine:
ofVideoPlayer loadedMovie; ofPixels tempPixels; loadedMovie.load("ExistingMovie.mp4"); tempPixels = loadedMovie.getPixels();
These lines result in an error:
ofVideoPlayer loadedMovie; ofPixels tempPixels; loadedMovie.load("NonExistingMovie.mp4"); // failed movie load, no movie gets loaded loadedMovie.load("ExistingMovie.mp4"); tempPixels = loadedMovie.getPixels();
Error:
[ error ] ofAVFoundationPlayer: getPixels(): Returning pixels that may be unallocated. Make sure to initialize the video player before calling getPixels.
I also tried to close() the player after the failed movie load and before loading a new one, but that made no difference. How can I initialize the video player again or is there something else wrong? Any ideas would greatly be appreciated?
There was another post regarding this error, but for the ofxiOSVideoPlayer. Are they maybe related?
Video to sequenceMy setup:
Using of v0.9.2 with Qt Creator 3.6.0 on OS X 10.11
Posts: 3
Participants: 1