Don't clear buffer when we are close to the end of stream
Created by: epiclabsDASH
This PR fixes an issue reported by @nicosang. There were playback stall issues while clearing completely the buffer (because an audio track switch, for example) when playback was very close to the end of the stream.