projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add system build to autoconf/automake
[goodguy/history.git]
/
cinelerra-5.1
/
cinelerra
/
record.C
diff --git
a/cinelerra-5.1/cinelerra/record.C
b/cinelerra-5.1/cinelerra/record.C
index 45e6b3d36e7fa5237e0f5d6960ad1f7e77368702..d2247d57bd7d9e14a932eb704bff1b3da36fc4cb 100644
(file)
--- a/
cinelerra-5.1/cinelerra/record.C
+++ b/
cinelerra-5.1/cinelerra/record.C
@@
-1912,11
+1912,12
@@
int Record::stop_commercial_capture(int run_job)
int Record::
spawn(const char *fmt, ...)
{
int Record::
spawn(const char *fmt, ...)
{
- c
har exe_path[BCTEXTLEN], cmd[BCTEXTLEN]
;
-
get_exe_path(exe_path)
;
+ c
onst char *exec_path = File::get_cinlib_path()
;
+
char cmd[BCTEXTLEN], *cp = cmd, *ep = cp+sizeof(cmd)-1
;
va_list ap; va_start(ap, fmt);
va_list ap; va_start(ap, fmt);
- int n = snprintf(cmd, sizeof(cmd), "exec %s/", exe_path);
- vsnprintf(cmd+n, sizeof(cmd)-n, fmt, ap); va_end(ap);
+ cp += snprintf(cp, ep-cp, "exec %s/", exec_path);
+ cp += vsnprintf(cp, ep-cp, fmt, ap); va_end(ap);
+ *cp = 0;
pid_t pid = vfork();
if( pid < 0 ) return -1;
if( pid > 0 ) return pid;
pid_t pid = vfork();
if( pid < 0 ) return -1;
if( pid > 0 ) return pid;