Multimedia: Improved the bufferring logic