Skip to content

Commit

Permalink
Merge pull request #47 from giordano/mg/safe
Browse files Browse the repository at this point in the history
Use thread-safe call to `ffmpeg` in Julia v1.6
  • Loading branch information
giordano authored Aug 13, 2021
2 parents a819cde + bb4eee3 commit 1b04ffc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/FFMPEG.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,12 @@ built with clang version 6.0.1 (tags/RELEASE_601/final)
```
"""
function exe(arg::Cmd; command = ffmpeg, collect = false)
if collect
command() do command_path
collectexecoutput(`$command_path $arg`)
end
f = collect ? collectexecoutput : Base.run
@static if VERSION v"1.6"
f(`$(command()) $arg`)
else
command() do command_path
Base.run(`$command_path $arg`)
f(`$command_path $arg`)
end
end
end
Expand Down

0 comments on commit 1b04ffc

Please sign in to comment.