chrisstaite / lameenc

Python bindings around the LAME encoder
GNU Lesser General Public License v3.0
51 stars 8 forks source link

Corrects the size of a bytearray returned from `flush`. #3

Closed kibumh closed 5 years ago

kibumh commented 5 years ago

1. Due to a bug (using offset + blockSize, not offset + bytes), flush returned a bytearray of a size 8192 most of the time.

2. lame_encode_flush is changed to be called only once. When I tested, the second call to lame_encode_flush always returned 0. lame's source code also calls the function once. See https://sourceforge.net/p/lame/svn/HEAD/tree/trunk/lame/frontend/lame_main.c:479.