Skip to content

Commit

Permalink
Catch CodecException
Browse files Browse the repository at this point in the history
  • Loading branch information
EzequielAdrianM committed Jan 11, 2024
1 parent 3db652d commit 84a32b8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ protected void onPrepare(@NonNull MediaEncoderEngine.Controller controller, long
}
mMediaCodec.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);
mSurface = mMediaCodec.createInputSurface();
mMediaCodec.start();
try {
mMediaCodec.start();
} catch (MediaCodec.CodecException e) {
throw new RuntimeException(e);

Check warning on line 87 in cameraview/src/main/java/com/otaliastudios/cameraview/video/encoding/VideoMediaEncoder.java

View check run for this annotation

Codecov / codecov/patch

cameraview/src/main/java/com/otaliastudios/cameraview/video/encoding/VideoMediaEncoder.java#L86-L87

Added lines #L86 - L87 were not covered by tests
}
}

@EncoderThread
Expand Down

0 comments on commit 84a32b8

Please sign in to comment.