Closed jfreymuth closed 6 years ago
Thanks for the comments.
I see how being castable to Seeker that only panics can be a problem. will think of a way around it.
For calls to read after seek, yes that's a bug. Note also this comment
which recognises another bug in codec.Codec and proposes to use an interface in its place.
I can get a new codec.Codec in place in the next two days or so. Could you help review the new version?
codec.SeekingDecoder
calls a codec'sSeekingDecoder
function with a*brCloser
. This struct implementsio.Reader
via abufio.Reader
, but also exposes theSeek
method of the underlying Reader, so calls toRead
after calls toSeek
return wrong data.Also, a codec's
Decoder
function is called with a struct that can be type asserted to anio.Seeker
, but it'sSeek
method always panics, which is not technically a bug, but very inconvenient with the way my oggvorbis package works.