Destroy input frame on GMP encode on error conditions.

Review is here - https://rbcommons.com/s/OpenH264/r/582/