Destroy input frame on GMP encode on error conditions.
Merge pull request #1055 from ethanhugg/frameleakonerror

Destroy input frame on GMP encode on error conditions.