Libav 11beta

During my tests of streaming to a ChromeCast dongle the audio most of the times did not come through or was distorted.

Therefore I tried to fix it in the code and this is the result.
It still contains extra debug lines and I can remove them.
It can now also down or upsample channels on request but I have not yet changed this in the code so you can specify this on the GET URL.