fix encode bug
fix frame situation