Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry pick PR #919: [android] Update MediaCodec exception handling #960

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down