RustAudio / lewton

Rust vorbis decoder
Other
261 stars 26 forks source link

Encapsulate headers in OggStreamReader #85

Open TonalidadeHidrica opened 3 years ago

TonalidadeHidrica commented 3 years ago

Currently, three header fields in OggStreamReader, ident_hdr, comment_hdr and setup_hdr, are public fields. Although it is easy to access, these fields can be overwritten by the user of the parser and may lead to illegal state. These should be a private field and accessed through getter functions instead.

est31 commented 3 years ago

It's a breaking change but I'm not objected to such breaking changes. Sounds like a good idea!