refine method EncodeFrame
Merge pull request #654 from volvet/refine_enc_frame

refine method EncodeFrame