зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1338086 - Remove useless else blocks in order to reduce complexity in dom/media r=jya
MozReview-Commit-ID: IA3oVcvzTQw --HG-- extra : rebase_source : 808f76256387d3f259a0ce42fc3cfe6416b6d8a8
This commit is contained in:
Родитель
6d3ed37df9
Коммит
c19020ed69
|
@ -101,43 +101,39 @@ CanHandleCodecsType(const MediaContainerType& aType,
|
||||||
if (OggDecoder::IsSupportedType(mimeType)) {
|
if (OggDecoder::IsSupportedType(mimeType)) {
|
||||||
if (OggDecoder::IsSupportedType(aType)) {
|
if (OggDecoder::IsSupportedType(aType)) {
|
||||||
return CANPLAY_YES;
|
return CANPLAY_YES;
|
||||||
} else {
|
}
|
||||||
// We can only reach this position if a particular codec was requested,
|
// We can only reach this position if a particular codec was requested,
|
||||||
// ogg is supported and working: the codec must be invalid.
|
// ogg is supported and working: the codec must be invalid.
|
||||||
return CANPLAY_NO;
|
return CANPLAY_NO;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (WaveDecoder::IsSupportedType(MediaContainerType(mimeType))) {
|
if (WaveDecoder::IsSupportedType(MediaContainerType(mimeType))) {
|
||||||
if (WaveDecoder::IsSupportedType(aType)) {
|
if (WaveDecoder::IsSupportedType(aType)) {
|
||||||
return CANPLAY_YES;
|
return CANPLAY_YES;
|
||||||
} else {
|
}
|
||||||
// We can only reach this position if a particular codec was requested,
|
// We can only reach this position if a particular codec was requested,
|
||||||
// ogg is supported and working: the codec must be invalid.
|
// ogg is supported and working: the codec must be invalid.
|
||||||
return CANPLAY_NO;
|
return CANPLAY_NO;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#if !defined(MOZ_OMX_WEBM_DECODER)
|
#if !defined(MOZ_OMX_WEBM_DECODER)
|
||||||
if (WebMDecoder::IsSupportedType(mimeType)) {
|
if (WebMDecoder::IsSupportedType(mimeType)) {
|
||||||
if (WebMDecoder::IsSupportedType(aType)) {
|
if (WebMDecoder::IsSupportedType(aType)) {
|
||||||
return CANPLAY_YES;
|
return CANPLAY_YES;
|
||||||
} else {
|
}
|
||||||
// We can only reach this position if a particular codec was requested,
|
// We can only reach this position if a particular codec was requested,
|
||||||
// webm is supported and working: the codec must be invalid.
|
// webm is supported and working: the codec must be invalid.
|
||||||
return CANPLAY_NO;
|
return CANPLAY_NO;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef MOZ_FMP4
|
#ifdef MOZ_FMP4
|
||||||
if (MP4Decoder::IsSupportedType(mimeType,
|
if (MP4Decoder::IsSupportedType(mimeType,
|
||||||
/* DecoderDoctorDiagnostics* */ nullptr)) {
|
/* DecoderDoctorDiagnostics* */ nullptr)) {
|
||||||
if (MP4Decoder::IsSupportedType(aType, aDiagnostics)) {
|
if (MP4Decoder::IsSupportedType(aType, aDiagnostics)) {
|
||||||
return CANPLAY_YES;
|
return CANPLAY_YES;
|
||||||
} else {
|
}
|
||||||
// We can only reach this position if a particular codec was requested,
|
// We can only reach this position if a particular codec was requested,
|
||||||
// fmp4 is supported and working: the codec must be invalid.
|
// fmp4 is supported and working: the codec must be invalid.
|
||||||
return CANPLAY_NO;
|
return CANPLAY_NO;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
if (MP3Decoder::IsSupportedType(aType)) {
|
if (MP3Decoder::IsSupportedType(aType)) {
|
||||||
return CANPLAY_YES;
|
return CANPLAY_YES;
|
||||||
|
@ -166,7 +162,6 @@ CanHandleCodecsType(const MediaContainerType& aType,
|
||||||
// At least one requested codec is not supported.
|
// At least one requested codec is not supported.
|
||||||
return CANPLAY_NO;
|
return CANPLAY_NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
return CANPLAY_YES;
|
return CANPLAY_YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче