Bug 1328038: Refuse to play High 4:4:4 Predictive Profile. r=JamesCheng

It is not supported by Windows WMF.

MozReview-Commit-ID: 2OyjC0qGwD4

--HG--
extra : rebase_source : 0ffe6595d94aefd0a3d340f382fe9319bcc8024f
This commit is contained in:
Jean-Yves Avenard 2017-01-03 06:58:09 +11:00
parent 33e6894feb
commit a9ce3fa61d
2 changed files with 11 additions and 7 deletions

View File

@ -129,12 +129,15 @@ public:
// do not support YUV444 format.
// For consistency, all decoders should be checked.
if (mp4_demuxer::H264::DecodeSPSFromExtraData(extraData, spsdata) &&
spsdata.chroma_format_idc == PDMFactory::kYUV444) {
return CheckResult(SupportChecker::Reason::kVideoFormatNotSupported,
MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR,
RESULT_DETAIL("Decoder may not have the capability to handle"
" the requested video format"
" with YUV444 chroma subsampling.")));
(spsdata.profile_idc == 244 /* Hi444PP */ ||
spsdata.chroma_format_idc == PDMFactory::kYUV444)) {
return CheckResult(
SupportChecker::Reason::kVideoFormatNotSupported,
MediaResult(
NS_ERROR_DOM_MEDIA_FATAL_ERR,
RESULT_DETAIL("Decoder may not have the capability to handle"
" the requested video format"
" with YUV444 chroma subsampling.")));
}
}
return CheckResult(SupportChecker::Reason::kSupported);

View File

@ -181,7 +181,8 @@ H264Converter::CreateDecoder(DecoderDoctorDiagnostics* aDiagnostics)
if (mp4_demuxer::H264::DecodeSPSFromExtraData(mCurrentConfig.mExtraData, spsdata)) {
// Do some format check here.
// WMF H.264 Video Decoder and Apple ATDecoder do not support YUV444 format.
if (spsdata.chroma_format_idc == 3 /*YUV444*/) {
if (spsdata.profile_idc == 244 /* Hi444PP */ ||
spsdata.chroma_format_idc == PDMFactory::kYUV444) {
mLastError = NS_ERROR_FAILURE;
if (aDiagnostics) {
aDiagnostics->SetVideoNotSupported();