Playing list of video with ofVideoPlayer on raspberry pi memory leaking

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) {
		delete player;
		player = new ofVideoPlayer();
		currentIndex = currentIndex % playListSize;
		currentVideoIndex = playList[currentIndex];	   	// playlist index is starting with 1
		player->load(videoBook[currentVideoIndex-1]);	// so -1

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.

Have you tried to use a non-pointer ofVideoPlayer and just load the next movie?

A memory leak may be buried somewhere deep inside gstreamer and hard to flush out.

I already tried with non-pointer one.
before load new movie, close(); but same issue.

now I’m trying with ofxOMXPlayer addon for raspberry pi. thanks for this one!!

with ofxOMXPlayer, randomly quit itself. I don’t know why.
and also, analog audio is not working. I already try this command.

I can test only with HDMI output(no composite display device). so I’ll update this issue later.

no audio out…
with aplay testing. it’s fine even with HDMI out…

without HDMI connect, sounds playing well.