From 31afea0173dda6fddb6bc293cd4085e16248f446 Mon Sep 17 00:00:00 2001 From: Matthew Gregan Date: Wed, 27 Aug 2014 18:15:36 +1200 Subject: [PATCH] Bug 1044498 - Pass saved init segment to decoder's NotifyDataAvailable. r=cajbir --- content/media/mediasource/SourceBuffer.cpp | 3 +++ content/media/webm/WebMBufferedParser.cpp | 1 + 2 files changed, 4 insertions(+) diff --git a/content/media/mediasource/SourceBuffer.cpp b/content/media/mediasource/SourceBuffer.cpp index 849c7c5b49e..858dc5d93f8 100644 --- a/content/media/mediasource/SourceBuffer.cpp +++ b/content/media/mediasource/SourceBuffer.cpp @@ -590,6 +590,9 @@ SourceBuffer::AppendData(const uint8_t* aData, uint32_t aLength, ErrorResult& aR MSE_DEBUG("SourceBuffer(%p)::AppendData: Decoder marked as initialized.", this); mDecoderInitialized = true; const nsTArray& initData = mParser->InitData(); + mDecoder->NotifyDataArrived(reinterpret_cast(initData.Elements()), + initData.Length(), + 0); mDecoder->GetResource()->AppendData(initData.Elements(), initData.Length()); } mLastParsedTimestamp = end; diff --git a/content/media/webm/WebMBufferedParser.cpp b/content/media/webm/WebMBufferedParser.cpp index 62a9aaed2ba..dcc9eccd41a 100644 --- a/content/media/webm/WebMBufferedParser.cpp +++ b/content/media/webm/WebMBufferedParser.cpp @@ -127,6 +127,7 @@ void WebMBufferedParser::Append(const unsigned char* aBuffer, uint32_t aLength, } break; case READ_TIMECODESCALE: + MOZ_ASSERT(mGotTimecodeScale); mTimecodeScale = mVInt.mValue; mState = READ_ELEMENT_ID; break;