Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.
This repository was archived by the owner on Sep 29, 2023. It is now read-only.

ffmpeg InputPipe & OutputPipe issue #19

Description

@bennyscetbun

Hi there,
I was trying to use your code and i found this in your code:

// InputPipe ...
func (t *Transcoder) InputPipe(w *io.WriteCloser, r *io.ReadCloser) transcoder.Transcoder {
	if &t.input == nil {
		t.inputPipeWriter = w
		t.inputPipeReader = r
	}
	return t
}

// OutputPipe ...
func (t *Transcoder) OutputPipe(w *io.WriteCloser, r *io.ReadCloser) transcoder.Transcoder {
	if &t.output == nil {
		t.outputPipeWriter = w
		t.outputPipeReader = r
	}
	return t
}

i don't understand why you've wrote &t.input == nil and &t.output == nil.
if t was nil, t.input should fail and if t.input is empty its address will never be nil (same for t.output)
It should be t.input == "" and t.output == nil ?
or i missed something ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions