From 69b4556ac927c1c45a18f965bda553d80f953719 Mon Sep 17 00:00:00 2001 From: Matteo Date: Thu, 30 Nov 2017 11:53:19 +0100 Subject: [PATCH] Fixed xcode crash caused by file created used for the pipe --- src/ofxVideoRecorder.cpp | 7 +++++++ src/ofxVideoRecorder.h | 1 + 2 files changed, 8 insertions(+) mode change 100644 => 100755 src/ofxVideoRecorder.cpp mode change 100644 => 100755 src/ofxVideoRecorder.h diff --git a/src/ofxVideoRecorder.cpp b/src/ofxVideoRecorder.cpp old mode 100644 new mode 100755 index b20079e..4d56371 --- a/src/ofxVideoRecorder.cpp +++ b/src/ofxVideoRecorder.cpp @@ -231,6 +231,13 @@ ofxVideoRecorder::ofxVideoRecorder(){ outputPixelFormat = ""; } +ofxVideoRecorder::~ofxVideoRecorder(){ + if(ofFile::doesFileExist(videoPipePath)){ + string cmd = "bash --login -c 'rm " + videoPipePath + "'"; + system(cmd.c_str()); + } +} + //-------------------------------------------------------------- bool ofxVideoRecorder::setup(string fname, int w, int h, float fps, int sampleRate, int channels, bool sysClockSync, bool silent){ if(bIsInitialized) diff --git a/src/ofxVideoRecorder.h b/src/ofxVideoRecorder.h old mode 100644 new mode 100755 index c3095b7..81e4a6a --- a/src/ofxVideoRecorder.h +++ b/src/ofxVideoRecorder.h @@ -120,6 +120,7 @@ class ofxVideoRecorder : public ofThread { public: ofxVideoRecorder(); + ~ofxVideoRecorder(); void threadedFunction();