Bug 1041950 - Fix codec context allocation; r=edwin
Bug 1041950 - Fix usage with FFmpeg version 54 and above; r=k17e