Kill ffmpeg if context is cancelled

This commit is contained in:
Deluan 2022-11-26 15:06:59 -05:00 committed by Joe Stump
parent b796856f0a
commit 06a3718310
No known key found for this signature in database
GPG Key ID: 29151C3EC48A0EB9

View File

@ -25,7 +25,7 @@ func (e *externalTranscoder) Start(ctx context.Context, command, path string, ma
args := createTranscodeCommand(command, path, maxBitRate)
log.Trace(ctx, "Executing transcoding command", "cmd", args)
cmd := exec.Command(args[0], args[1:]...) // #nosec
cmd := exec.CommandContext(ctx, args[0], args[1:]...) // #nosec
cmd.Stderr = os.Stderr
if f, err = cmd.StdoutPipe(); err != nil {
return