mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 22:32:51 +00:00
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:
parent
6d3ed37df9
commit
c19020ed69
@ -101,30 +101,27 @@ CanHandleCodecsType(const MediaContainerType& aType,
|
||||
if (OggDecoder::IsSupportedType(mimeType)) {
|
||||
if (OggDecoder::IsSupportedType(aType)) {
|
||||
return CANPLAY_YES;
|
||||
} else {
|
||||
// We can only reach this position if a particular codec was requested,
|
||||
// ogg is supported and working: the codec must be invalid.
|
||||
return CANPLAY_NO;
|
||||
}
|
||||
// We can only reach this position if a particular codec was requested,
|
||||
// ogg is supported and working: the codec must be invalid.
|
||||
return CANPLAY_NO;
|
||||
}
|
||||
if (WaveDecoder::IsSupportedType(MediaContainerType(mimeType))) {
|
||||
if (WaveDecoder::IsSupportedType(aType)) {
|
||||
return CANPLAY_YES;
|
||||
} else {
|
||||
// We can only reach this position if a particular codec was requested,
|
||||
// ogg is supported and working: the codec must be invalid.
|
||||
return CANPLAY_NO;
|
||||
}
|
||||
// We can only reach this position if a particular codec was requested,
|
||||
// ogg is supported and working: the codec must be invalid.
|
||||
return CANPLAY_NO;
|
||||
}
|
||||
#if !defined(MOZ_OMX_WEBM_DECODER)
|
||||
if (WebMDecoder::IsSupportedType(mimeType)) {
|
||||
if (WebMDecoder::IsSupportedType(aType)) {
|
||||
return CANPLAY_YES;
|
||||
} else {
|
||||
// We can only reach this position if a particular codec was requested,
|
||||
// webm is supported and working: the codec must be invalid.
|
||||
return CANPLAY_NO;
|
||||
}
|
||||
// We can only reach this position if a particular codec was requested,
|
||||
// webm is supported and working: the codec must be invalid.
|
||||
return CANPLAY_NO;
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_FMP4
|
||||
@ -132,11 +129,10 @@ CanHandleCodecsType(const MediaContainerType& aType,
|
||||
/* DecoderDoctorDiagnostics* */ nullptr)) {
|
||||
if (MP4Decoder::IsSupportedType(aType, aDiagnostics)) {
|
||||
return CANPLAY_YES;
|
||||
} else {
|
||||
// We can only reach this position if a particular codec was requested,
|
||||
// fmp4 is supported and working: the codec must be invalid.
|
||||
return CANPLAY_NO;
|
||||
}
|
||||
// We can only reach this position if a particular codec was requested,
|
||||
// fmp4 is supported and working: the codec must be invalid.
|
||||
return CANPLAY_NO;
|
||||
}
|
||||
#endif
|
||||
if (MP3Decoder::IsSupportedType(aType)) {
|
||||
@ -166,7 +162,6 @@ CanHandleCodecsType(const MediaContainerType& aType,
|
||||
// At least one requested codec is not supported.
|
||||
return CANPLAY_NO;
|
||||
}
|
||||
|
||||
return CANPLAY_YES;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user