Fix ffmpeg wrapper compatibility with libavcodec > 53.25.0

Based on pull request #685
Merge pull request #756 from taka-no-me:libavcodec53.25.0