aboutsummaryrefslogtreecommitdiff
path: root/src/recorder.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-10-03 15:49:34 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-10-03 15:49:34 +0200
commit920067622e7ba72dd6947eb8e7875719315872b9 (patch)
treeda28a7ec77d8c63e3fa74c18baf08a71c27ec9ee /src/recorder.cpp
parentc61253adbd5bed1d7393a3153f9c865517280431 (diff)
downloadosc-graphics-920067622e7ba72dd6947eb8e7875719315872b9.tar.gz
allow to stop video recoding via (/recorder/start s "") and OSCGraphics.record()
Diffstat (limited to 'src/recorder.cpp')
-rw-r--r--src/recorder.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/recorder.cpp b/src/recorder.cpp
index 13e2b13..6859f1b 100644
--- a/src/recorder.cpp
+++ b/src/recorder.cpp
@@ -69,6 +69,11 @@ Recorder::start(const char *filename)
-1, 0, -1, -1, -1, -1 /* no audio */
};
+ if (!filename || !*filename) {
+ stop();
+ return;
+ }
+
lock();
SDL_FFMPEGFREE_SAFE(file);