mediacodec: check exceptions after createByCodecName()
mediacodec: check exceptions after createByCodecName()

Release MediaCodec only if the codec has been successfully created.
This might avoid some crashes.

xkfz007/vlc,jomanmuk/vlc-2.2,vlc-mirror/vlc,jomanmuk/vlc-2.2,vlc-mirror/vlc,krichter722/vlc,shyamalschandra/vlc,xkfz007/vlc,jomanmuk/vlc-2.2,jomanmuk/vlc-2.2,shyamalschandra/vlc,shyamalschandra/vlc,krichter722/vlc,vlc-mirror/vlc,xkfz007/vlc,vlc-mirror/vlc,krichter722/vlc,krichter722/vlc,krichter722/vlc,jomanmuk/vlc-2.2,xkfz007/vlc,shyamalschandra/vlc,xkfz007/vlc,shyamalschandra/vlc,krichter722/vlc,vlc-mirror/vlc,krichter722/vlc,jomanmuk/vlc-2.2,shyamalschandra/vlc,vlc-mirror/vlc,vlc-mirror/vlc,jomanmuk/vlc-2.2,shyamalschandra/vlc,xkfz007/vlc,xkfz007/vlc