Skip to content

fix: unused CompilationOption in (*Stream) Compile #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yuchanns
Copy link

@yuchanns yuchanns commented May 24, 2024

Let me know if this is intentional.

ffmpeg-go/run.go

Lines 256 to 275 in 898ebfd

func (s *Stream) Compile(options ...CompilationOption) *exec.Cmd {
args := s.GetArgs()
cmd := exec.CommandContext(s.Context, s.FfmpegPath, args...)
if a, ok := s.Context.Value("Stdin").(io.Reader); ok {
cmd.Stdin = a
}
if a, ok := s.Context.Value("Stdout").(io.Writer); ok {
cmd.Stdout = a
}
if a, ok := s.Context.Value("Stderr").(io.Writer); ok {
cmd.Stderr = a
}
for _, option := range GlobalCommandOptions {
option(cmd)
}
if LogCompiledCommand {
log.Printf("compiled command: ffmpeg %s\n", strings.Join(args, " "))
}
return cmd
}

@yuchanns yuchanns changed the title fix: unused CompilationOptions in (*Stream) Run fix: unused CompilationOption in (*Stream) Compile May 24, 2024
@ale-rinaldi
Copy link

@yuchanns I was here exactly to make this contribution after struggling way too much time in trying to understand what I was doing wrong 😬 thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants