Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The byte-array mapped/returned by `AMediaCodec_getInputBuffer()` is not known to be initialized as the caller requires this API to subsequently initialize the data, and mapping/casting uninitialized memory segments as safe data in Rust is Undefined Behaviour. Instead, return a `MaybeUninit<u8>` type to be safe (as in: the user cannot *safely* read data in the returned slice, only write to it) and document the intent back to the user. Unfortunately, as of writing many useful API around _slices of_ `MaybeUninit` are still unstable.
- Loading branch information