diff --git a/starboard/android/apk/app/src/main/java/dev/cobalt/media/MediaCodecBridge.java b/starboard/android/apk/app/src/main/java/dev/cobalt/media/MediaCodecBridge.java index 3b89398ce949..1c8e89e0752c 100644 --- a/starboard/android/apk/app/src/main/java/dev/cobalt/media/MediaCodecBridge.java +++ b/starboard/android/apk/app/src/main/java/dev/cobalt/media/MediaCodecBridge.java @@ -853,7 +853,7 @@ private int flush() { try { mFlushed = true; mMediaCodec.flush(); - } catch (IllegalStateException e) { + } catch (Exception e) { Log.e(TAG, "Failed to flush MediaCodec", e); return MEDIA_CODEC_ERROR; } @@ -1019,6 +1019,9 @@ private int queueSecureInputBuffer( "Failed to queue secure input buffer, CryptoException with error code " + e.getErrorCode()); return MEDIA_CODEC_ERROR; + } catch (IllegalArgumentException e) { + Log.e(TAG, "Failed to queue secure input buffer, IllegalArgumentException " + e); + return MEDIA_CODEC_ERROR; } catch (IllegalStateException e) { Log.e(TAG, "Failed to queue secure input buffer, IllegalStateException " + e); return MEDIA_CODEC_ERROR;