MediaDecoderStateMachine::SendStreamAudio() is incorrectly calling UsecsToFrames

RESOLVED FIXED in Firefox 42

Status

()

defect
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: cpearce, Assigned: jwwang)

Tracking

Trunk
mozilla42
x86_64
All
Points:
---

Firefox Tracking Flags

(firefox42 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

MediaDecoderStateMachine::SendStreamAudio() is incorrectly calling UsecsToFrames

http://mxr.mozilla.org/mozilla-central/source/content/media/MediaDecoderStateMachine.cpp#303

UsecsToFrames is as defined as:

UsecsToFrames(int64_t aUsecs, uint32_t aRate)

But we call it as:

   CheckedInt64 audioWrittenOffset = UsecsToFrames(mInfo.mAudio.mRate,
       aStream->mInitialTime + mStartTime) + aStream->mAudioFramesWritten;

rate/time needs to be swapped here.
Posted patch Patch (obsolete) — Splinter Review
Ensure MediaDecoderStateMachine::SendStreamAudio() gets the order of arguments to UsecsToFrames correct...
Attachment #8491090 - Flags: review?(roc)
Comment on attachment 8491090 [details] [diff] [review]
Patch

Review of attachment 8491090 [details] [diff] [review]:
-----------------------------------------------------------------

great catch!
Attachment #8491090 - Flags: review?(roc) → review+
Credit goes to Sotaro for spotting this!
It looks like this patch never made itself to Central...
Flags: needinfo?(cpearce)
I never had the time to get it green. You're welcome to take it off my hands!
Flags: needinfo?(cpearce)
Rebase. https://treeherder.mozilla.org/#/jobs?repo=try&revision=9318f4583748
Assignee: cpearce → jwwang
Attachment #8491090 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Comment on attachment 8628176 [details] [diff] [review]
1068970_fix-v2.patch

Try looks green after rebase. https://treeherder.mozilla.org/#/jobs?repo=try&revision=9318f4583748

Carry r+ from roc.
Attachment #8628176 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/3c124eec5ebd
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.