made compatilble with avcodec version 6:0.8.13-1