Kill ffmpeg if context is cancelled

This commit is contained in:
Deluan 2022-11-26 15:06:59 -05:00
parent 76a94ecb70
commit 0bb133a6ac
1 changed files with 1 additions and 1 deletions

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