delete guess expected size feature
it it doing some really bad guesses for opus files
This commit is contained in:
@@ -2,6 +2,7 @@ package transcode
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
)
|
||||
@@ -14,6 +15,14 @@ func NewNoneTranscoder() *NoneTranscoder {
|
||||
return &NoneTranscoder{}
|
||||
}
|
||||
|
||||
func (*NoneTranscoder) Transcode(ctx context.Context, _ Profile, in string) (io.ReadCloser, error) {
|
||||
return os.Open(in)
|
||||
func (*NoneTranscoder) Transcode(ctx context.Context, _ Profile, in string, out io.Writer) error {
|
||||
file, err := os.Open(in)
|
||||
if err != nil {
|
||||
return fmt.Errorf("open file: %w", err)
|
||||
}
|
||||
defer file.Close()
|
||||
if _, err := io.Copy(out, file); err != nil {
|
||||
return fmt.Errorf("copy file: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user