| Index: Source/modules/mediasource/SourceBuffer.cpp
|
| diff --git a/Source/modules/mediasource/SourceBuffer.cpp b/Source/modules/mediasource/SourceBuffer.cpp
|
| index 3f9bbf97b7ac9d4c9188c45eccb459d9880f1c03..a87c7ddb7ea001f929ba153a32f453ca444d2b9a 100644
|
| --- a/Source/modules/mediasource/SourceBuffer.cpp
|
| +++ b/Source/modules/mediasource/SourceBuffer.cpp
|
| @@ -483,6 +483,13 @@ void SourceBuffer::scheduleEvent(const AtomicString& eventName)
|
| m_asyncEventQueue->enqueueEvent(event.release());
|
| }
|
|
|
| +void SourceBuffer::appendAndUpdateTimestampOffset(const unsigned char* data, unsigned length)
|
| +{
|
| + double newTimestampOffset;
|
| + if (m_webSourceBuffer->append(data, length, &newTimestampOffset))
|
| + m_timestampOffset = newTimestampOffset;
|
| +}
|
| +
|
| void SourceBuffer::appendBufferInternal(const unsigned char* data, unsigned size, ExceptionState& exceptionState)
|
| {
|
| // Section 3.2 appendBuffer()
|
| @@ -534,7 +541,7 @@ void SourceBuffer::appendBufferAsyncPart()
|
| // so that it can clear its end of stream state if necessary.
|
| m_pendingAppendData.resize(1);
|
| }
|
| - m_webSourceBuffer->append(m_pendingAppendData.data(), appendSize);
|
| + appendAndUpdateTimestampOffset(m_pendingAppendData.data(), appendSize);
|
|
|
| // 3. Set the updating attribute to false.
|
| m_updating = false;
|
| @@ -689,7 +696,7 @@ void SourceBuffer::didReceiveDataForClient(const char* data, unsigned dataLength
|
| ASSERT(m_updating);
|
| ASSERT(m_loader);
|
|
|
| - m_webSourceBuffer->append(reinterpret_cast<const unsigned char*>(data), dataLength);
|
| + appendAndUpdateTimestampOffset(reinterpret_cast<const unsigned char*>(data), dataLength);
|
| }
|
|
|
| void SourceBuffer::didFinishLoading()
|
|
|