u2takey / ffmpeg-go

golang binding for ffmpeg
Apache License 2.0
1.66k stars 167 forks source link

[BUG] The params `options` in run.go/Stream.Compile is not used #119

Open delichik opened 3 months ago

delichik commented 3 months ago

The params options in run.go/Stream.Compile is not used

// ... in run.go
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
}
// ...