Your question is about code from the videolan project. The code you pasted is on the videolan web server.
The videolan developers page says they have an IRC channel (irc://irc.videolan.org/videolan) and mailing lists where you can ask questions.
I recommend you do some more reading of the code in the DASH stream_filter module, especially the buffer directory (which calculates the buffered percent you're asking about) and then ask a specific question on IRC or the mailing list.
Unfortunately, this code doesn't seem to have comments or documentation. If the normal channels aren't helpful, you can ask the authors. They were kind enough to include email addresses in the copyright notice at the top of the file.