Avoid testing for FLAC on .opus decoding
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2f8ffb318f
commit
5241fcfde7
|
@ -162,5 +162,5 @@ func (f Format) Encode(source audio.Source, writer io.WriteCloser, options map[s
|
|||
}
|
||||
|
||||
func (f Format) Identify(peek []byte, extension string) bool {
|
||||
return bytes.Compare(peek[:4], []byte{'O', 'g', 'g', 'S'}) == 0 || bytes.Compare(peek[:4], []byte{'f', 'L', 'a', 'C'}) == 0 || (bytes.Compare(peek[:3], []byte{'I', 'D', '3'}) == 0 && extension != "mp3") || extension == "flac" || extension == "ogg"
|
||||
return (bytes.Compare(peek[:4], []byte{'O', 'g', 'g', 'S'}) == 0 && extension != "opus" && extension != "vorbis") || bytes.Compare(peek[:4], []byte{'f', 'L', 'a', 'C'}) == 0 || (bytes.Compare(peek[:3], []byte{'I', 'D', '3'}) == 0 && extension != "mp3") || extension == "flac" || extension == "ogg"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue