Skip to content

Commit 92db33b

Browse files
authored
feat: don't create 'out.gif' by default (#518)
Only create a GIF file if `Output <name>.gif` appears in the tape file. Closes #363
1 parent 239b93b commit 92db33b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

video.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,7 @@ func buildFFopts(opts VideoOptions, targetFile string) []string {
138138

139139
// MakeGIF takes a list of images (as frames) and converts them to a GIF.
140140
func MakeGIF(opts VideoOptions) *exec.Cmd {
141-
targetFile := opts.Output.GIF
142-
143-
if opts.Output.GIF == "" && opts.Output.WebM == "" && opts.Output.MP4 == "" {
144-
targetFile = "out.gif"
145-
} else if opts.Output.GIF == "" {
141+
if opts.Output.GIF == "" {
146142
return nil
147143
}
148144

@@ -152,7 +148,7 @@ func MakeGIF(opts VideoOptions) *exec.Cmd {
152148
//nolint:gosec
153149
return exec.Command(
154150
"ffmpeg",
155-
buildFFopts(opts, targetFile)...,
151+
buildFFopts(opts, opts.Output.GIF)...,
156152
)
157153
}
158154

0 commit comments

Comments
 (0)