Closed Bug 1207376 Opened 9 years ago Closed 9 years ago

canPlayType("video/mp4; codecs="avc1.42E01E, mp4a.40.2"") erroneously returns "probably" on Windows 8.1 N

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox41 --- unaffected
firefox42 --- fixed
firefox43 --- fixed
firefox44 --- fixed

People

(Reporter: cpearce, Assigned: cpearce)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Our canPlayType logic is failing on Windows N.
This is a regression in 42. I bet from jya making the H264Converter not create the decoder until a sample is input.
Netflix rely on isTypeSupported working, so we'll need this fixed and uplifted to beta42.
Blocks: EME
Summary: canPlayType("video/mp4; codecs="avc1.42E01E, mp4a.40.2"") returns probably on Windows 8.1 N → canPlayType("video/mp4; codecs="avc1.42E01E, mp4a.40.2"") erroneously returns "probably" on Windows 8.1 N
If WMF is broken or not available, we still end up creating the H264Converter in PlatformDecoderModule::CreateDecoder(), but it wraps a null decoder. We need to report the error out to the caller, otherwise MP4Decoder::CanHandleMediaType() ends up reporting the wrong value out.

This means on Windows N, and on Windows where Codec Tweak Tool has buggered WMF, our HTMLMediaElement.canPlayType() and everything that depends on that is wrong.

So we need to propogate the error if when the H264Converter::CreateDecoder() call made by the H264Converter() constructor fails.

The alternative to exposing the H264Converter::mLastError like this patch does would be to make H264Converter::CreateDecoder() public, and call that directly outside of the H264Converter constructor in PlatformDecoderModule::CreateDecoder() right after constructing the H264Converter.

We'll need to uplift this to Beta 42. We need this for Netflix.
Attachment #8664639 - Flags: review?(jyavenard)
(In reply to Chris Pearce (:cpearce) from comment #1)
> This is a regression in 42. I bet from jya making the H264Converter not
> create the decoder until a sample is input.

This statement is incorrect. jya is awesome.
Comment on attachment 8664639 [details] [diff] [review]
Patch: Ensure PlatformDecoderModule::CreateDecoder reports failure to create H264Converter

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

I don't really like it because it breaks the abstraction; but I can't see another way to handle this without calling Init()
Attachment #8664639 - Flags: review?(jyavenard) → review+
Needs uplift.
Flags: needinfo?(cpearce)
https://hg.mozilla.org/mozilla-central/rev/2f16dbf52986
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Comment on attachment 8664639 [details] [diff] [review]
Patch: Ensure PlatformDecoderModule::CreateDecoder reports failure to create H264Converter

Approval Request Comment
[Feature/regressing bug #]: Regression from MSE uplifts to 42, affects Netflix/EME

[User impact if declined]: Websites won't be able to correctly detect whether Firefox cannot play MP4/AAC/H264. This means Netflix will try to use EME when it's not going to work, and they won't be able to detect that it's not going to work.

[Describe test coverage new/current, TreeHerder]: We have lots of MSE/EME mochitests

[Risks and why]: Low, just checks an error code.

[String/UUID change made/needed]: None.
Attachment #8664639 - Flags: approval-mozilla-beta?
Attachment #8664639 - Flags: approval-mozilla-aurora?
Comment on attachment 8664639 [details] [diff] [review]
Patch: Ensure PlatformDecoderModule::CreateDecoder reports failure to create H264Converter

Fix a regression, taking it
Attachment #8664639 - Flags: approval-mozilla-beta?
Attachment #8664639 - Flags: approval-mozilla-beta+
Attachment #8664639 - Flags: approval-mozilla-aurora?
Attachment #8664639 - Flags: approval-mozilla-aurora+
Flags: needinfo?(cpearce)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: