Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
ffworker
Commits
ea285e37
Commit
ea285e37
authored
Jan 13, 2018
by
Julian Rother
Browse files
Fixed job cancel checks
parent
3fe1ca62
Changes
2
Hide whitespace changes
Inline
Side-by-side
simple_live_transcode.c
View file @
ea285e37
...
...
@@ -49,7 +49,7 @@ int main(int argc, char *argv[])
while
(
1
)
{
canceled
=
ping_job
(
jobid
,
"running"
,
"{
\"
log
\"
:
\"
%s
\"
}"
,
jescape
(
get_avlogbuf
()));
if
(
canceled
)
if
(
canceled
==
1
)
kill
(
pid
,
SIGINT
);
/* Stop ffmpeg */
poll
(
&
fds
,
1
,
15000
);
if
(
fds
.
revents
&
POLLIN
)
...
...
@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
}
waitpid
(
pid
,
&
ret
,
0
);
if
(
canceled
&&
(
WEXITSTATUS
(
ret
)
==
255
||
(
WIFSIGNALED
(
ret
)
&&
WTERMSIG
(
ret
)
==
SIGINT
)))
if
(
canceled
==
1
&&
(
WEXITSTATUS
(
ret
)
==
255
||
(
WIFSIGNALED
(
ret
)
&&
WTERMSIG
(
ret
)
==
SIGINT
)))
ping_job
(
jobid
,
"finished"
,
"{
\"
log
\"
:
\"
%s
\"
}"
,
jescape
(
get_avlogbuf
()));
else
if
(
WIFSIGNALED
(
ret
))
job_failed
(
"Subprocesses was killed by signal %s (%i)"
,
strsignal
(
WTERMSIG
(
ret
)),
WTERMSIG
(
ret
));
...
...
transcode.c
View file @
ea285e37
...
...
@@ -337,7 +337,7 @@ int main(int argc, char *argv[])
{
canceled
=
ping_job
(
jobid
,
"running"
,
"{
\"
progress
\"
: %i,
\"
log
\"
:
\"
%s
\"
}"
,
_progress
,
jescape
(
get_avlogbuf
()));
if
(
canceled
)
if
(
canceled
==
1
)
job_failed
(
"Job canceled"
);
progress
=
_progress
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment