Bug 1696780 - Update mp4parse-rust to 94c3b1f. r=bryce,kinetik
authorJon Bauman <jbauman@mozilla.com>
Tue, 09 Mar 2021 21:36:31 +0000
changeset 570366 27b1509c20510fbba264c20fe1ded40ec840c141
parent 570365 ee0901edd84785a9404e610effa6bb4c0a1ca443
child 570367 dda4e84b3332338f337826b074ee8b11e45c860b
push id38275
push usercsabou@mozilla.com
push dateWed, 10 Mar 2021 09:39:27 +0000
treeherdermozilla-central@056c2a428e2d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbryce, kinetik
bugs1696780
milestone88.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1696780 - Update mp4parse-rust to 94c3b1f. r=bryce,kinetik Differential Revision: https://phabricator.services.mozilla.com/D107702
.cargo/config.in
Cargo.lock
third_party/rust/mp4parse/.cargo-checksum.json
third_party/rust/mp4parse/src/boxes.rs
third_party/rust/mp4parse/src/lib.rs
toolkit/library/rust/shared/Cargo.toml
--- a/.cargo/config.in
+++ b/.cargo/config.in
@@ -15,17 +15,17 @@ rev = "01c7a0da8d34059f7dae8ab9e7512529f
 [source."https://github.com/mozilla/neqo"]
 git = "https://github.com/mozilla/neqo"
 replace-with = "vendored-sources"
 tag = "v0.4.21"
 
 [source."https://github.com/mozilla/mp4parse-rust"]
 git = "https://github.com/mozilla/mp4parse-rust"
 replace-with = "vendored-sources"
-rev = "ccbe4eb8a96d64e58414ec70d2479c7f363e6763"
+rev = "94c3b1f368c82aefcbf51967f6aa296a9ccceb69"
 
 [source."https://github.com/mozilla/cubeb-pulse-rs"]
 git = "https://github.com/mozilla/cubeb-pulse-rs"
 replace-with = "vendored-sources"
 rev = "c87b50aebfa088c1ad30c74819d4e9829f88b2e3"
 
 [source."https://github.com/mozilla/cubeb-coreaudio-rs"]
 git = "https://github.com/mozilla/cubeb-coreaudio-rs"
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3290,17 +3290,17 @@ dependencies = [
  "regex",
  "rust-ini",
  "semver",
 ]
 
 [[package]]
 name = "mp4parse"
 version = "0.11.5"
-source = "git+https://github.com/mozilla/mp4parse-rust?rev=ccbe4eb8a96d64e58414ec70d2479c7f363e6763#ccbe4eb8a96d64e58414ec70d2479c7f363e6763"
+source = "git+https://github.com/mozilla/mp4parse-rust?rev=94c3b1f368c82aefcbf51967f6aa296a9ccceb69#94c3b1f368c82aefcbf51967f6aa296a9ccceb69"
 dependencies = [
  "bitreader",
  "byteorder",
  "env_logger",
  "fallible_collections",
  "hashbrown",
  "log",
  "num-traits",
@@ -3309,17 +3309,17 @@ dependencies = [
 
 [[package]]
 name = "mp4parse-gtest"
 version = "0.1.0"
 
 [[package]]
 name = "mp4parse_capi"
 version = "0.11.5"
-source = "git+https://github.com/mozilla/mp4parse-rust?rev=ccbe4eb8a96d64e58414ec70d2479c7f363e6763#ccbe4eb8a96d64e58414ec70d2479c7f363e6763"
+source = "git+https://github.com/mozilla/mp4parse-rust?rev=94c3b1f368c82aefcbf51967f6aa296a9ccceb69#94c3b1f368c82aefcbf51967f6aa296a9ccceb69"
 dependencies = [
  "byteorder",
  "fallible_collections",
  "log",
  "mp4parse",
  "num-traits",
 ]
 
--- a/third_party/rust/mp4parse/.cargo-checksum.json
+++ b/third_party/rust/mp4parse/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"20d60a51a713582d285ab994d13014f101450a359f5ada589b82ea97615ae2e8","benches/avif_benchmark.rs":"e4bdd69c7b434448ef7080bbf488b2f64c2c88121fe1c1f7e9d9c8def3d648ae","src/boxes.rs":"f6e44b9ce634817a3ab46ba991747b92b228d404d0c3396b9f52eeb6087d87ab","src/lib.rs":"7724b3224ae56135eed3c41c42a7fa06659da127e61f9baedbf62452d2125214","src/macros.rs":"76c840f9299797527fe71aa5b378ffb01312767372b45cc62deddb19775400ae","src/tests.rs":"7598fba59c47dc0f713c5a71fa477d046b595ba6362c6e32d775e33197770055","tests/bbb_sunflower_QCIF_30fps_h263_noaudio_1f.3gp":"03e5b1264d0a188d77b9e676ba3ce23a801b17aaa11c0343dfd851d6ea4e3a40","tests/bug-1661347.avif":"a4741189d897401c746492d780bccf4c42dddde8f46d01a791f9656aac2ab164","tests/corrupt/bad-ipma-flags.avif":"ecde7997b97db1910b9dcc7ca8e3c8957da0e83681ea9008c66dc9f12b78ad19","tests/corrupt/bad-ipma-version.avif":"7f9a1a0b4ebbf8d800d22eaae5ff78970cc6b811317db6c1467c6883952b7c9b","tests/corrupt/bug-1655846.avif":"e0a5a06225800fadf05f5352503a4cec11af73eef705c43b4acab5f4a99dea50","tests/corrupt/bug-1661347.avif":"31c26561e1d9eafb60f7c5968b82a0859d203d73f17f26b29276256acee12966","tests/kodim-extents.avif":"e4de6d124535206c3daca797e64cccc6a5b439f93733af52a95b1e82d581a78b","tests/overflow.rs":"16b591d8def1a155b3b997622f6ea255536870d99c3d8f97c51755b77a50de3c","tests/public.rs":"07d4a2a0b94007b85b8e581c3d3f0e49e1598980a502dd2577e4da600c9275fa"},"package":null}
\ No newline at end of file
+{"files":{"Cargo.toml":"20d60a51a713582d285ab994d13014f101450a359f5ada589b82ea97615ae2e8","benches/avif_benchmark.rs":"e4bdd69c7b434448ef7080bbf488b2f64c2c88121fe1c1f7e9d9c8def3d648ae","src/boxes.rs":"c11c408e4be679233cde528c1194ab566456da99bf1acf9a67fecfe2251da84f","src/lib.rs":"a35dc6240437f41ef73cc890e59d4c4ad63881d4ab13880c5b2b4d21a2297cce","src/macros.rs":"76c840f9299797527fe71aa5b378ffb01312767372b45cc62deddb19775400ae","src/tests.rs":"7598fba59c47dc0f713c5a71fa477d046b595ba6362c6e32d775e33197770055","tests/bbb_sunflower_QCIF_30fps_h263_noaudio_1f.3gp":"03e5b1264d0a188d77b9e676ba3ce23a801b17aaa11c0343dfd851d6ea4e3a40","tests/bug-1661347.avif":"a4741189d897401c746492d780bccf4c42dddde8f46d01a791f9656aac2ab164","tests/corrupt/bad-ipma-flags.avif":"ecde7997b97db1910b9dcc7ca8e3c8957da0e83681ea9008c66dc9f12b78ad19","tests/corrupt/bad-ipma-version.avif":"7f9a1a0b4ebbf8d800d22eaae5ff78970cc6b811317db6c1467c6883952b7c9b","tests/corrupt/bug-1655846.avif":"e0a5a06225800fadf05f5352503a4cec11af73eef705c43b4acab5f4a99dea50","tests/corrupt/bug-1661347.avif":"31c26561e1d9eafb60f7c5968b82a0859d203d73f17f26b29276256acee12966","tests/kodim-extents.avif":"e4de6d124535206c3daca797e64cccc6a5b439f93733af52a95b1e82d581a78b","tests/overflow.rs":"16b591d8def1a155b3b997622f6ea255536870d99c3d8f97c51755b77a50de3c","tests/public.rs":"07d4a2a0b94007b85b8e581c3d3f0e49e1598980a502dd2577e4da600c9275fa"},"package":null}
\ No newline at end of file
--- a/third_party/rust/mp4parse/src/boxes.rs
+++ b/third_party/rust/mp4parse/src/boxes.rs
@@ -9,49 +9,50 @@ struct Vec;
 #[allow(dead_code)]
 struct Box;
 #[allow(dead_code)]
 struct HashMap;
 #[allow(dead_code)]
 struct String;
 
 macro_rules! box_database {
-    ($($boxenum:ident $boxtype:expr),*,) => {
+    ($($(#[$attr:meta])* $boxenum:ident $boxtype:expr),*,) => {
         #[derive(Clone, Copy, PartialEq)]
         pub enum BoxType {
-            $($boxenum),*,
+            $($(#[$attr])* $boxenum),*,
             UnknownBox(u32),
         }
 
         impl From<u32> for BoxType {
             fn from(t: u32) -> BoxType {
                 use self::BoxType::*;
                 match t {
-                    $($boxtype => $boxenum),*,
+                    $($(#[$attr])* $boxtype => $boxenum),*,
                     _ => UnknownBox(t),
                 }
             }
         }
 
         impl Into<u32> for BoxType {
             fn into(self) -> u32 {
                 use self::BoxType::*;
                 match self {
-                    $($boxenum => $boxtype),*,
+                    $($(#[$attr])* $boxenum => $boxtype),*,
                     UnknownBox(t) => t,
                 }
             }
         }
 
-        impl fmt::Debug for BoxType {
-            fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-                let fourcc: FourCC = From::from(self.clone());
-                fourcc.fmt(f)
-            }
-        }
+    }
+}
+
+impl fmt::Debug for BoxType {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        let fourcc: FourCC = From::from(self.clone());
+        fourcc.fmt(f)
     }
 }
 
 #[derive(Default, PartialEq, Clone)]
 pub struct FourCC {
     pub value: [u8; 4],
 }
 
--- a/third_party/rust/mp4parse/src/lib.rs
+++ b/third_party/rust/mp4parse/src/lib.rs
@@ -3341,20 +3341,25 @@ fn read_dc_descriptor(data: &[u8], esds:
     skip(des, 12)?;
 
     if data.len().to_u64() > des.position() {
         find_descriptor(&data[des.position().try_into()?..data.len()], esds)?;
     }
 
     esds.audio_codec = match object_profile {
         0x40 | 0x41 => CodecType::AAC,
-        0x6B => CodecType::MP3,
+        0x69 | 0x6B => CodecType::MP3,
         _ => CodecType::Unknown,
     };
 
+    debug!(
+        "read_dc_descriptor: esds.audio_codec = {:?}",
+        esds.audio_codec
+    );
+
     Ok(())
 }
 
 /// See MPEG-4 Systems (ISO 14496-1:2010) ยง 7.2.6.5
 fn read_es_descriptor(data: &[u8], esds: &mut ES_Descriptor) -> Result<()> {
     let des = &mut Cursor::new(data);
 
     skip(des, 2)?;
--- a/toolkit/library/rust/shared/Cargo.toml
+++ b/toolkit/library/rust/shared/Cargo.toml
@@ -4,17 +4,17 @@ version = "0.1.0"
 authors = ["nobody@mozilla.org"]
 license = "MPL-2.0"
 description = "Shared Rust code for libxul"
 
 [dependencies]
 geckoservo = { path = "../../../../servo/ports/geckolib" }
 kvstore = { path = "../../../components/kvstore" }
 lmdb-rkv-sys = { version = "0.11", features = ["mdb_idl_logn_9"] }
-mp4parse_capi = { git = "https://github.com/mozilla/mp4parse-rust", rev = "ccbe4eb8a96d64e58414ec70d2479c7f363e6763" }
+mp4parse_capi = { git = "https://github.com/mozilla/mp4parse-rust", rev = "94c3b1f368c82aefcbf51967f6aa296a9ccceb69" }
 nserror = { path = "../../../../xpcom/rust/nserror" }
 nsstring = { path = "../../../../xpcom/rust/nsstring" }
 netwerk_helper = { path = "../../../../netwerk/base/rust-helper" }
 xpcom = { path = "../../../../xpcom/rust/xpcom" }
 prefs_parser = { path = "../../../../modules/libpref/parser" }
 static_prefs = { path = "../../../../modules/libpref/init/static_prefs" }
 profiler_helper = { path = "../../../../tools/profiler/rust-helper", optional = true }
 mozurl = { path = "../../../../netwerk/base/mozurl" }