fix compatibility with latest libav