just before buffering