зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1446538 - Update mp4parse-rust to ded91a16. r=SimonSapin
Qualify calls to our FallibleVec trait to avoid clashes with new additions to nightly libstd. MozReview-Commit-ID: dNwuVIYJe --HG-- extra : rebase_source : d9d64c18c89ec5f1ea0993045dd180239a63c210
This commit is contained in:
Родитель
33d6f805b4
Коммит
07c68b6af3
|
@ -28,7 +28,7 @@ diff --git a/media/libstagefright/binding/mp4parse_capi/Cargo.toml b/media/libst
|
|||
index a30e045..a965f06 100644
|
||||
--- a/media/libstagefright/binding/mp4parse_capi/Cargo.toml
|
||||
+++ b/media/libstagefright/binding/mp4parse_capi/Cargo.toml
|
||||
@@ -18,22 +18,13 @@
|
||||
@@ -18,23 +18,16 @@
|
||||
"*.mp4",
|
||||
]
|
||||
|
||||
|
@ -38,7 +38,6 @@ index a30e045..a965f06 100644
|
|||
|
||||
[dependencies]
|
||||
byteorder = "1.2.1"
|
||||
-env_logger = "0.5.3"
|
||||
log = "0.4"
|
||||
|
||||
# To enable fallible memory allocation, add 'features = ["mp4parse_fallible"]'
|
||||
|
@ -46,10 +45,13 @@ index a30e045..a965f06 100644
|
|||
-mp4parse = {version = "0.10.0", path = "../mp4parse"}
|
||||
+mp4parse = {version = "0.10.0", path = "../mp4parse", features = ["mp4parse_fallible"]}
|
||||
num-traits = "0.2.0"
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = "0.5.3"
|
||||
-
|
||||
-[build-dependencies]
|
||||
-cbindgen = "0.4.3"
|
||||
-cbindgen = "0.5.2"
|
||||
-
|
||||
-[features]
|
||||
-fuzz = ["mp4parse/fuzz"]
|
||||
-
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ typedef struct {
|
|||
} Mp4parseTrackVideoInfo;
|
||||
|
||||
typedef struct {
|
||||
intptr_t (*read)(uint8_t*, size_t, void*);
|
||||
intptr_t (*read)(uint8_t*, uintptr_t, void*);
|
||||
void *userdata;
|
||||
} Mp4parseIo;
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ const TABLE_SIZE_LIMIT: u32 = 30 * 60 * 60 * 24 * 7;
|
|||
pub fn vec_push<T>(vec: &mut Vec<T>, val: T) -> std::result::Result<(), ()> {
|
||||
#[cfg(feature = "mp4parse_fallible")]
|
||||
{
|
||||
return vec.try_push(val);
|
||||
return FallibleVec::try_push(vec, val);
|
||||
}
|
||||
|
||||
vec.push(val);
|
||||
|
@ -56,7 +56,7 @@ pub fn vec_push<T>(vec: &mut Vec<T>, val: T) -> std::result::Result<(), ()> {
|
|||
pub fn vec_reserve<T>(vec: &mut Vec<T>, size: usize) -> std::result::Result<(), ()> {
|
||||
#[cfg(feature = "mp4parse_fallible")]
|
||||
{
|
||||
return vec.try_reserve(size);
|
||||
return FallibleVec::try_reserve(vec, size);
|
||||
}
|
||||
|
||||
vec.reserve(size);
|
||||
|
@ -68,7 +68,7 @@ fn allocate_read_buf(size: usize) -> std::result::Result<Vec<u8>, ()> {
|
|||
#[cfg(feature = "mp4parse_fallible")]
|
||||
{
|
||||
let mut buf: Vec<u8> = Vec::new();
|
||||
buf.try_reserve(size)?;
|
||||
FallibleVec::try_reserve(&mut buf, size)?;
|
||||
unsafe { buf.set_len(size); }
|
||||
return Ok(buf);
|
||||
}
|
||||
|
|
|
@ -28,3 +28,6 @@ log = "0.4"
|
|||
# in mp4parse brace.
|
||||
mp4parse = {version = "0.10.0", path = "../mp4parse", features = ["mp4parse_fallible"]}
|
||||
num-traits = "0.2.0"
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = "0.5.3"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Script to update mp4parse-rust sources to latest upstream
|
||||
|
||||
# Default version.
|
||||
VER="v0.10.0"
|
||||
VER="ded91a1661daaf55515e572aadd8e92e6d71cbaf"
|
||||
|
||||
# Accept version or commit from the command line.
|
||||
if test -n "$1"; then
|
||||
|
|
Загрузка…
Ссылка в новой задаче