this code is no problem in OSX/WIN but rasperry pi 3.
it looks like no problem but after 1~2 hours, app is freezed.
so I check with “free -h” command in terminal, I figured out that memory leaking somewhere.
ofVideoPlayer *player;
...
void ofApp::update(){
if(player->getCurrentFrame() > player->getTotalNumFrames() - 200) {
player->stop();
player->close();
delete player;
player = new ofVideoPlayer();
player->setLoopState(OF_LOOP_NORMAL);
currentIndex++;
currentIndex = currentIndex % playListSize;
currentVideoIndex = playList[currentIndex]; // playlist index is starting with 1
player->load(videoBook[currentVideoIndex-1]); // so -1
player->play();
}
player->update();
}
anyone help?
also, I’ll fixed this issue with linux script, every 1 hour, automatically kill this app and restart… (I know this is dirty way). but so far I cannot fix this issue.