Skip to content

Commit

Permalink
Add ClosePipes() to release output reading goroutines
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKordic committed Jun 7, 2022
1 parent 52ebd95 commit cf66c9a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ffmpeg/piped_transcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ type PipedTranscoding struct {
outputs []PipedOutput
}

func (t *PipedTranscoding) ClosePipes() {
t.input.Read.Close()
t.input.Write.Close()
for i := 0; i < len(t.outputs); i++ {
t.outputs[i].Read.Close()
t.outputs[i].Write.Close()
}
}

func (t *PipedTranscoding) SetInput(input TranscodeOptionsIn) error {
t.input.Options = &input
var err error
Expand Down

0 comments on commit cf66c9a

Please sign in to comment.