• Justin Ruggles's avatar
    libmp3lame: resize the output buffer if needed · abd8b9e7
    Justin Ruggles authored
    The LAME API documentation for the required buffer size refers to the size for
    a single encode call. However, we store multiple frames in the same output
    buffer but only read 1 frame at a time out of it. As a result, the buffer size
    given in lame_encode_buffer() is actually smaller than what it should be.
    Since we do not know how many frames it will end up buffering, it is best to
    just reallocate if needed.
    abd8b9e7
libmp3lame.c 10.1 KB