Details
- Reviewers
tsmith alwu - Group Reviewers
media-playback-reviewers - Commits
- rMOZILLACENTRAL4c8dfff616b0: Bug 1535980 - Ensure that the audio rate read by WebMDemuxer is correctly…
- Bugzilla Bug ID
- 1535980
Diff Detail
- Repository
- rMOZILLACENTRAL mozilla-central
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
dom/media/webm/WebMDemuxer.cpp | ||
---|---|---|
385–388 | AudioInfo::MAX_RATE is stored as a uint32_t as per here, whereas params.rate is stored as a float here. A better idea than the static_cast<decltype> could be to have params.rate and AudioInfo::MAX_RATE use the same datatype for storage, though I'm not sure of the potential side-effects caused by going this route. The added check for values lower than zero is because params.rate was holding a negative number using the sample video from the bug report. We could also make improvements to the sanity checks in libnestegg here, for example, though I'm not sure whether making changes to libnestegg is outside the scope of this work. |
Code analysis found 1 defect in the diff 612671:
- 1 defect found by clang-format
You can run this analysis locally with:
- ./mach clang-format -p dom/media/webm/WebMDemuxer.cpp
For your convenience, here is a patch that fixes all the clang-format defects (use it in your repository with hg import or git apply -p0).
If you see a problem in this automated review, please report it here.
You can view these defects in the Diff Detail section of Phabricator diff 612671.
LGTM, could we also add a crash test for this? because we already have the test file in comment2, thanks!
This revision requires a Testing Policy Project Tag to be set before landing. Please apply one of testing-approved, testing-exception-unchanged, testing-exception-ui, testing-exception-elsewhere, testing-exception-other. Tip: this Firefox add-on makes it easy!