Bug 1395244 - check sample_table before using. r?kinetik
MozReview-Commit-ID: HtIS39UPIIM
--- a/media/libstagefright/binding/mp4parse_capi/src/lib.rs
+++ b/media/libstagefright/binding/mp4parse_capi/src/lib.rs
@@ -972,17 +972,17 @@ fn create_sample_table(track: &Track, tr
_ => return None,
}
}
// Correct composition end time due to 'ctts' causes composition time re-ordering.
//
// Composition end time is not in specification. However, gecko needs it, so we need to
// calculate to correct the composition end time.
- if track.ctts.is_some() {
+ if sample_table.len() > 0 {
// Create an index table refers to sample_table and sorted by start_composisiton time.
let mut sort_table = Vec::new();
sort_table.reserve(sample_table.len());
for i in 0 .. sample_table.len() {
sort_table.push(i);
}
sort_table.sort_by_key(|i| {
--- a/media/libstagefright/binding/update-rust.sh
+++ b/media/libstagefright/binding/update-rust.sh
@@ -1,13 +1,13 @@
#!/bin/sh -e
# Script to update mp4parse-rust sources to latest upstream
# Default version.
-VER=81260ded506dce968716720e10544c510f37d222
+VER=18430298d7d48ec8dfa1f80f9a10cc9b5f6cf40a
# Accept version or commit from the command line.
if test -n "$1"; then
VER=$1
fi
echo "Fetching sources..."
rm -rf _upstream