Bug 1313497 - AppendBufferTask can take SourceBufferAttributes by const& - r=jya
authorGerald Squelart <gsquelart@mozilla.com>
Sun, 13 Nov 2016 16:39:47 +1100
changeset 324381 40e0fe1aa9d92fab23ecc16ce13cbda452367c49
parent 324380 2125fc90d9bcadbb1dc2f07ac34dc9017b9be650
child 324382 30674252d7f55602dcc9502daf7f00337df29278
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersjya
bugs1313497
milestone53.0a1
Bug 1313497 - AppendBufferTask can take SourceBufferAttributes by const& - r=jya A small optimization found while working on the previous patch. MozReview-Commit-ID: 4w2LI5mqUvS
dom/media/mediasource/SourceBufferTask.h
--- a/dom/media/mediasource/SourceBufferTask.h
+++ b/dom/media/mediasource/SourceBufferTask.h
@@ -43,17 +43,17 @@ public:
 
 protected:
   virtual ~SourceBufferTask() {}
 };
 
 class AppendBufferTask : public SourceBufferTask {
 public:
   AppendBufferTask(MediaByteBuffer* aData,
-                   SourceBufferAttributes aAttributes)
+                   const SourceBufferAttributes& aAttributes)
   : mBuffer(aData)
   , mAttributes(aAttributes)
   {}
 
   static const Type sType = Type::AppendBuffer;
   Type GetType() const override { return Type::AppendBuffer; }
 
   RefPtr<MediaByteBuffer> mBuffer;
@@ -103,9 +103,9 @@ public:
 class DetachTask : public SourceBufferTask {
 public:
   static const Type sType = Type::Detach;
   Type GetType() const override { return Type::Detach; }
 };
 
 } // end mozilla namespace
 
-#endif
\ No newline at end of file
+#endif