audio/vorbis: Bug fix: compilation error

This commit is contained in:
Hajime Hoshi 2018-09-02 23:55:59 +09:00
parent 70044013e9
commit d5ca4c3953

View File

@ -102,7 +102,7 @@ func (d *decoded) readUntil(posInBytes int) error {
return nil
}
func (d *decoded) Read(b byte) (int, error) {
func (d *decoded) Read(b []byte) (int, error) {
l := d.totalBytes - d.posInBytes
if l > len(b) {
l = len(b)
@ -176,7 +176,7 @@ func decode(in audio.ReadSeekCloser) (*decoded, int, int, error) {
decoder: r,
}
runtime.SetFinalizer(d, (*decoded).Close)
if _, err := d.Read(make(byte, 65536)); err != nil && err != io.EOF {
if _, err := d.Read(make([]byte, 65536)); err != nil && err != io.EOF {
return nil, 0, 0, err
}
if _, err := d.Seek(0, io.SeekStart); err != nil {