Introduce a small internal buffer for I/O. Change nestegg_io read callback to return number of bytes read, allowing short reads. nestegg now uses an internal 8KB buffer to service reads internally, refilling the buffer via the updated read callback. This significantly reduces I/O callback overhead for the many single-byte reads the EBML and lace parsers require. The max_offset parse fence is enforced during init only; it is cleared after init succeeds so that subsequent cue loading, seeking, and packet reading can access the full stream. Refactor the test suite to run all tests through legacy read, buffered readn, and short-read (16 byte cap) readn I/O paths. Add a seek-then-read test and a max_offset fencing test. Enable sanitizer halt_on_error in the test harness.
Introduce a small internal buffer for I/O.
Change nestegg_io read callback to return number of bytes read, allowing short reads. nestegg now uses an internal 8KB buffer to service reads internally, refilling the buffer via the updated read callback. This significantly reduces I/O callback overhead for the many single-byte reads the EBML and lace parsers require.
The max_offset parse fence is enforced during init only; it is cleared after init succeeds so that subsequent cue loading, seeking, and packet reading can access the full stream.
Refactor the test suite to run all tests through legacy read, buffered readn, and short-read (16 byte cap) readn I/O paths. Add a seek-then-read test and a max_offset fencing test. Enable sanitizer halt_on_error in the test harness.
See INSTALL for build instructions.
Licensed under an ISC-style license. See LICENSE for details.
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802047560号
See INSTALL for build instructions.
Licensed under an ISC-style license. See LICENSE for details.