Bug 1489102 - P1. mp4parse-rust resync to f6032a118aa498525145adf611cd7b3bec0e0216 r=bryce
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 07 Sep 2018 14:17:06 +0000
changeset 493678 70224e316a2cbf815e6916029c98f19989e78c03
parent 493669 36ee80fc14aefdd00385da7fc073f28e78dfbd40
child 493679 256bc4a68c8b6446d9212b670c80a248d8786bc9
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbryce
bugs1489102
milestone64.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 1489102 - P1. mp4parse-rust resync to f6032a118aa498525145adf611cd7b3bec0e0216 r=bryce temp fix, will do a full one once upstream change is merged Differential Revision: https://phabricator.services.mozilla.com/D5198
Cargo.lock
media/mp4parse-rust/mp4parse/src/lib.rs
media/mp4parse-rust/update-rust.sh
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1871,17 +1871,17 @@ source = "registry+https://github.com/ru
 dependencies = [
  "serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "rsdparsa"
 version = "0.1.0"
 dependencies = [
- "log 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 1.0.66 (git+https://github.com/servo/serde?branch=deserialize_from_enums8)",
 ]
 
 [[package]]
 name = "rsdparsa_capi"
 version = "0.1.0"
 dependencies = [
--- a/media/mp4parse-rust/mp4parse/src/lib.rs
+++ b/media/mp4parse-rust/mp4parse/src/lib.rs
@@ -1987,34 +1987,35 @@ fn read_audio_sample_entry<T: Read>(src:
     let mut protection_info = Vec::new();
     let mut iter = src.box_iter();
     while let Some(mut b) = iter.next_box()? {
         match b.head.name {
             BoxType::ESDBox => {
                 if (name != BoxType::MP4AudioSampleEntry &&
                     name != BoxType::ProtectedAudioSampleEntry) ||
                     codec_specific.is_some() {
-                        return Err(Error::InvalidData("malformed audio sample entry"));
+                    return Err(Error::InvalidData("malformed audio sample entry"));
                 }
-
                 let esds = read_esds(&mut b)?;
                 codec_type = esds.audio_codec;
                 codec_specific = Some(AudioCodecSpecific::ES_Descriptor(esds));
             }
             BoxType::FLACSpecificBox => {
-                if name != BoxType::FLACSampleEntry ||
+                if (name != BoxType::FLACSampleEntry &&
+                    name != BoxType::ProtectedAudioSampleEntry) ||
                     codec_specific.is_some() {
                     return Err(Error::InvalidData("malformed audio sample entry"));
                 }
                 let dfla = read_dfla(&mut b)?;
                 codec_type = CodecType::FLAC;
                 codec_specific = Some(AudioCodecSpecific::FLACSpecificBox(dfla));
             }
             BoxType::OpusSpecificBox => {
-                if name != BoxType::OpusSampleEntry ||
+                if (name != BoxType::OpusSampleEntry &&
+                    name != BoxType::ProtectedAudioSampleEntry) ||
                     codec_specific.is_some() {
                     return Err(Error::InvalidData("malformed audio sample entry"));
                 }
                 let dops = read_dops(&mut b)?;
                 codec_type = CodecType::Opus;
                 codec_specific = Some(AudioCodecSpecific::OpusSpecificBox(dops));
             }
             BoxType::ALACSpecificBox => {
--- a/media/mp4parse-rust/update-rust.sh
+++ b/media/mp4parse-rust/update-rust.sh
@@ -1,15 +1,15 @@
 #!/bin/sh
 # Script to update mp4parse-rust sources to latest upstream
 
 set -e
 
 # Default version.
-VER="681ce17e3a600e31844a9abbad6d46e413b2beba"
+VER="f6032a118aa498525145adf611cd7b3bec0e0216"
 
 # Accept version or commit from the command line.
 if test -n "$1"; then
   VER=$1
 fi
 
 echo "Fetching sources..."
 rm -rf _upstream