viert / go-lame

new generation lamemp3 bindings for Go
MIT License
42 stars 11 forks source link

handle errors from flush to avoid possible panics #5

Closed grahamlyus closed 3 years ago

grahamlyus commented 3 years ago

I encountered occasional panics due to lame_encode_flush returning -3. I think this is due to the finalizer calling e.Close directly and then Close being called afterward.

viert commented 3 years ago

Makes sense. Haven't come across that behaviour. Will merge it tomorrow after a closer look