ofxFFmpegRecorder
ofxFFmpegRecorder copied to clipboard
Sometimes crashes when stop is called
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
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...