Bug 1377370. P2 - simplify HLSDecoder::Clone() for HLSResource doesn't support clone at all. draft
authorJW Wang <jwwang@mozilla.com>
Fri, 30 Jun 2017 10:20:32 +0800
changeset 603210 7814a37479c0c4a329fa519abff8a50caf34612d
parent 603209 e11932c681af0ef0e492c1727ba3316b1b16d6c0
child 603211 898ac14860e27ccace5ee5dbe1a73eaa8587ff89
push id66683
push userjwwang@mozilla.com
push dateMon, 03 Jul 2017 02:24:24 +0000
bugs1377370
milestone56.0a1
Bug 1377370. P2 - simplify HLSDecoder::Clone() for HLSResource doesn't support clone at all. MozReview-Commit-ID: FxebHdK4EmM
dom/media/hls/HLSDecoder.cpp
--- a/dom/media/hls/HLSDecoder.cpp
+++ b/dom/media/hls/HLSDecoder.cpp
@@ -34,20 +34,18 @@ HLSDecoder::CreateStateMachine()
                           GetVideoFrameContainer());
 
   return new MediaDecoderStateMachine(this, mReader);
 }
 
 ChannelMediaDecoder*
 HLSDecoder::Clone(MediaDecoderInit& aInit)
 {
-  if (!IsEnabled()) {
-    return nullptr;
-  }
-  return new HLSDecoder(aInit);
+  MOZ_CRASH("Clone is not supported");
+  return nullptr;
 }
 
 bool
 HLSDecoder::IsEnabled()
 {
   return MediaPrefs::HLSEnabled() && (jni::GetAPIVersion() >= 16);
 }