xbmc/xbmc — pull request #2901 by w3sip (2013-06-21 01:32:35+00:00)
Title: Introduced setting 'limitcacherate', which, if present and set to 'false', disables rate limiter when writing to the cache buffer, therefore allowing the buffer to be filled as fast as the source allows

I've been testing some more with PR:2843, and have been logging buffer utilization stats, to track the performance. I've noticed, that with the limiter on, buffer was still being depleted at times, during bitrate surge periods. Not with every source, not every time -- but still was happening.

Disabling the limiter (and, when doing so, making player believe it doesn't utilize cache by not returning stats) helps to maintain buffer as full as possible. Underruns are virtually gone. And, if memory buffer is used, the cache writer thread will block whenever the buffer is full, therefore preventing uncontrolled looping.