ofxFFmpegRecorder icon indicating copy to clipboard operation
ofxFFmpegRecorder copied to clipboard

Sometimes crashes when stop is called

Open Vamoss opened this issue 6 years ago • 1 comments

Hi,

When stop recording fwrite is causing a fatal exception, on a windows machine. I saw that there is a m_Thread.join() trying to stop the processFrame thread, but this is not working sometimes.

So, I did a hack that waits processFrame finish before stop recording:

void ofxFFmpegRecorder::stop()
{
	while (m_Frames.size() > 0) {
		ofSleepMillis(100);
	}
	//same code

Vamoss avatar Nov 23 '19 13:11 Vamoss

Hey, thanks for this, @Vamoss I was having the same problem.

Oddly, if I lower the milliseconds to 50 I'll get another exception thrown with a strange stack trace, including ofxFFmpegRecorder::addFrame(), a simple tick() method that only increments a timer, and a recursive_mutex error. Putting it back up to 100 seems to get rid of this though...

image

diemildefreude avatar May 24 '23 00:05 diemildefreude