Closed Bug 1207915 Opened 9 years ago Closed 9 years ago

Apply the fix of bug 1052206 to DecodedStream

Categories

(Core :: Audio/Video: Playback, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

References

Details

Attachments

(1 file)

To prevent audio glitches resulted from rounding errors when converting usecs to frames. (see bug 1052206 comment 78 for the details)
Assignee: nobody → jwwang
Depends on: 1052206
Thanks for the review!
sorry had to back this out seems this caused errors like https://treeherder.mozilla.org/logviewer.html#?job_id=14637149&repo=mozilla-inbound
Flags: needinfo?(jwwang)
See bug 1062686 where a few hundred failures were logged from this as well
Ok, I found the problem. When playing small-shot.ogg (rate=11127, duration=276085), we have 1st sample: start=0, end=92028, frames=1024 2nd sample: start=92028 end=184056 frames=1024 After sending the 1st sample, |mAudioFramesWritten| becomes 1024. When sending the 2nd sample, we have frame offset = 92028*11127/1000000 = 1023.995 =~ 1023 smaller than |mAudioFramesWritten==1024|. So the 2nd sample is considered being sent already which is wrong. I will check end times to determine whether a sample is processed or not to avoid such rounding errors.
Flags: needinfo?(jwwang)
Comment on attachment 8665250 [details] MozReview Request: Bug 1207915 - Apply the fix of bug 1052206 to DecodedStream. Bug 1207915 - Apply the fix of bug 1052206 to DecodedStream.
Comment on attachment 8665250 [details] MozReview Request: Bug 1207915 - Apply the fix of bug 1052206 to DecodedStream. Fix the problem in comment 9. Try seems green this time: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f2c0c6961b6a
Attachment #8665250 - Flags: review+ → review?(roc)
Thanks!
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: