Closed eblanca closed 6 years ago
Is there a way that this can be tested?
No, there isn't. Unless modifying the frontend code for printing out the size of any frame it creates (for a given talkactivity) and then using an external tool for comparison. The point is, actually this function is not used.
Try applying this patch to the master branch (it is a debug statement, absolutely useless). It will print a warning whenever a mismatch is detected between the size of the frame twolame creates and the calculated size (just encode with "-d" to enable padding).
After this, apply the pull request and you will see the warnings disappear.
twolame_get_framelength() isn't called anywhere inside libtoolame or in the frontend, so it will be tricky to test for.
Really should add unit tests (using libcheck?) at some point to test for things like this.
When enabling padding for a bitstream, the code wrongly returns any frame size as padded. Now this is fixed.