fix wrong interpretion of EncodeFrame return type