of v0.8, Ubuntu 12.04, gstreamer 0.1
I have ofVideoPlayer instances that create critical GStreamer unref errors on two occasions. The errors don’t crash my program, but cause small hickups in the processing.
The error >>
GStreamer-CRITICAL **: gst_mini_object_unref: assertion `GST_IS_MINI_OBJECT (mini_object)’ failed
It comes up when loading a new video into a ofVideoPlayer instance, that already had a previous movie. Both movies (the first, and the second) play and display fine, just when i call the loadMovie() function for the second movie, the error pops up.
videoElement::videoElement(string filename) {
movie = ofPtr<ofVideoPlayer>( new ofVideoPlayer() );
this->loadMovie(filename);
}
void videoElement::loadMovie(string filename) {
movie->loadMovie(filename); /////// GStreamer-CRITICAL ERROR on 2nd call
}
Then i added movie->stop(), movie->close(), and reinitialization of the movie ofPtr, to trace better at what location the error happens. And turns out it happens when calling movie->close();
void videoElement::loadMovie(string filename) {
movie->stop();
movie->close(); /////// GStreamer-CRITICAL ERROR on 2nd call
movie = ofPtr<ofVideoPlayer>();
movie = ofPtr<ofVideoPlayer>( new ofVideoPlayer() );
movie->loadMovie(filename);
}
I get the same error when erasing the parent instance that includes the ofVideoPlayer instance.
Any chance someone has encountered this error before?