avresample: Reallocate the internal buffer to the correct size