Closed Bug 1153686 Opened 5 years ago Closed 5 years ago

HTMLMediaElement::UpdateReadyStateForData can lead to invalid audio format being reported.

Categories

(Core :: Audio/Video, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: jya, Assigned: jya)

References

Details

Attachments

(1 file, 1 obsolete file)

Under some circumstances, invalid audio track format can be reported.

HTMLMediaElement::UpdateReadyStateForData calls MetadataLoaded with a dummy MediaInfo object that is only properly constructed for the video track.

Problem was made worse by bug 1129263 as prior the invalid data was mostly ignored.

The MediaInfo object passed, contains the information from the default AudioInfo constructor. As such we will only ever report audio with 44.1kHz, Stereo with a track ID of 2.
Depends on: 1153049
Remove mMediaSize class member (and use mMediaInfo instead) and various reworks. The actual fix for this bug will come for free with bug 1153049. Various fixes/cleans along the way introduced in bug 1129263. Fix 'resize' event being fired twice
Attachment #8591494 - Flags: review?(roc)
Assignee: nobody → jyavenard
Status: NEW → ASSIGNED
Comment on attachment 8591494 [details] [diff] [review]
Remove redundant mMediaSize member

this cause resize event to be fired out of order. better fix coming
Attachment #8591494 - Attachment is obsolete: true
Attachment #8591494 - Flags: review?(roc)
See Also: → 951215
Comment on attachment 8591564 [details] [diff] [review]
Remove redundant mMediaSize member

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

nice
Attachment #8591564 - Flags: review?(roc) → review+
https://hg.mozilla.org/mozilla-central/rev/818a69e48d38
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.