-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media_codec: Uphold non-
null
guarantees in some erratic scenarios
The Android documentation does not comment on when functions could possibly return `null`, and while discussion in [#248] finds these unlikely enough to be communicated back to the user there is no 100% guarantee and the resulting pointers should as such always be checked (either at all, or also when `cfg!(debug_assertions)` happens to be disabled). Note that this `NonNull::new(..).unwrap()` pattern is found in many other places in the `ndk`. [#248]: #248
- Loading branch information
Showing
2 changed files
with
17 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters