It appears the issue has [already been reported](https://bugzilla.libav.org/show_bug.cgi?id=387) on the libav bug tracker with an identical patch.