fix/flac: Actually print relevant incorrect type (#49)
* fix/flac: Actually print relevant incorrect type `si` will always be `(*meta.StreamInfo)`, the relevant type is `block.Header.Type` which implements `Stringer` * Update flac.go Co-authored-by: Robin <mewmew@users.noreply.github.com> Co-authored-by: Robin <mewmew@users.noreply.github.com>
This commit is contained in:
parent
69bef32f45
commit
59ff7d9caa
2
flac.go
2
flac.go
|
@ -184,7 +184,7 @@ func (stream *Stream) parseStreamInfo() (block *meta.Block, err error) {
|
|||
}
|
||||
si, ok := block.Body.(*meta.StreamInfo)
|
||||
if !ok {
|
||||
return block, fmt.Errorf("flac.parseStreamInfo: incorrect type of first metadata block; expected *meta.StreamInfo, got %T", si)
|
||||
return block, fmt.Errorf("flac.parseStreamInfo: incorrect type of first metadata block; expected *meta.StreamInfo, got %T", block.Body)
|
||||
}
|
||||
stream.Info = si
|
||||
return block, nil
|
||||
|
|
Loading…
Reference in a new issue