This depends on the previous patch, and allows moving the codec profile to the new AVHWFramesContext.opaque field. Patch attached.