unref buffers going to analyser at the right time

This unrefs the buffer after the last chunk is pulled from it.