Prevent codec exceptions from crashing demo app.

Releasing the surface causes mediacodec to transition from
"executing" state which causes exceptions when interacting with it.
This race condition is not easily avoidable with current MediaCodec API,
so let's just catch the exceptions to prevent them bringing down whole
host app.

Bug: 319437468
Test: manual with OpenCamera (rapidly switching camera streams)
Change-Id: I6f96dfe1cd27dac9f807a56c0ddf952121f3229b
1 file changed