Bug 1313497 - AppendBufferTask can take SourceBufferAttributes by const& - r?jya
A small optimization found while working on the previous patch.
MozReview-Commit-ID: 4w2LI5mqUvS
--- 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