Bug 1373577. P3 - fix the comment since MediaResource::ReatAt() does update the offset of MediaResource.
MozReview-Commit-ID: AV2UhhBKNxJ
--- a/dom/media/MediaResource.h
+++ b/dom/media/MediaResource.h
@@ -787,25 +787,21 @@ public:
// Same as ReadAt, but doesn't try to cache around the read.
// Useful if you know that you will not read again from the same area.
nsresult UncachedReadAt(int64_t aOffset,
char* aBuffer,
uint32_t aCount,
uint32_t* aBytes) const;
- // Convenience methods, directly calling the MediaResource method of the same
- // name.
- // Those functions do not update the MediaResource offset as returned
- // by Tell().
-
// This method returns nullptr if anything fails.
// Otherwise, it returns an owned buffer.
// MediaReadAt may return fewer bytes than requested if end of stream is
// encountered. There is no need to call it again to get more data.
+ // Note this method will not update mOffset.
already_AddRefed<MediaByteBuffer> MediaReadAt(int64_t aOffset, uint32_t aCount) const
{
RefPtr<MediaByteBuffer> bytes = new MediaByteBuffer();
bool ok = bytes->SetLength(aCount, fallible);
NS_ENSURE_TRUE(ok, nullptr);
char* curr = reinterpret_cast<char*>(bytes->Elements());
const char* start = curr;
while (aCount > 0) {