Added media to correct branch; Cherry pick fix from dena branch

git-svn-id: https://www.libavg.de/svn/trunk/libavg@9013 44470bb9-56e9-0310-a0f8-c586564d3dc6
Cherrypicked and improved fix for #407

git-svn-id: https://www.libavg.de/svn/trunk/libavg@9014 44470bb9-56e9-0310-a0f8-c586564d3dc6