Skip to content

Fix bustage from BMO bug 1660551 #238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mp4parse/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ travis-ci = { repository = "https://github.com/mozilla/mp4parse-rust" }
byteorder = "1.2.1"
bitreader = { version = "0.3.2" }
hashbrown = "0.7.1"
num-traits = "0.2.0"
num-traits = "=0.2.10"
log = "0.4"
static_assertions = "1.1.0"

Expand Down
2 changes: 1 addition & 1 deletion mp4parse_capi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ travis-ci = { repository = "https://github.com/mozilla/mp4parse-rust" }
byteorder = "1.2.1"
log = "0.4"
mp4parse = {version = "0.11.2", path = "../mp4parse"}
num = "0.3.0"
num-traits = "=0.2.10"

[dev-dependencies]
env_logger = "0.7.1"
Expand Down
8 changes: 4 additions & 4 deletions mp4parse_capi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@

extern crate byteorder;
extern crate mp4parse;
extern crate num;
extern crate num_traits;

use byteorder::WriteBytesExt;
use num::{CheckedAdd, CheckedSub};
use num::{PrimInt, Zero};
use num_traits::{CheckedAdd, CheckedSub};
use num_traits::{PrimInt, Zero};
use std::convert::TryFrom;
use std::convert::TryInto;

Expand Down Expand Up @@ -704,7 +704,7 @@ where

let integer = numerator / denominator;
let remainder = numerator % denominator;
num::cast(scale2).and_then(|s| match integer.checked_mul(&s) {
num_traits::cast(scale2).and_then(|s| match integer.checked_mul(&s) {
Some(integer) => remainder
.checked_mul(&s)
.and_then(|remainder| (remainder / denominator).checked_add(&integer)),
Expand Down