main/ffmpeg: security fix (CVE-2014-5271,CVE-2014-5272)

fixes #3317