bug 1123492 ResetDecode() on subreaders when switching to current or seeking r=mattwoodrow

--HG--
extra : rebase_source : 1250d41d2daa7224ef2645eb3e51af3f8f81f237
extra : histedit_source : d2f19cb88cbe6ad9ce4fb93443f03474ccfd9f0b
This commit is contained in:
Karl Tomlinson 2015-02-18 19:23:31 +13:00
Родитель ac59ede2ff
Коммит 4a9e7e9d5f
3 изменённых файлов: 4 добавлений и 14 удалений

Просмотреть файл

@ -508,6 +508,7 @@ MediaSourceReader::SwitchAudioSource(int64_t* aTarget)
return SOURCE_EXISTING;
}
mAudioSourceDecoder = newDecoder;
GetAudioReader()->ResetDecode();
if (usedFuzz) {
// A decoder buffered range is continuous. We would have failed the exact
// search but succeeded the fuzzy one if our target was shortly before
@ -554,6 +555,7 @@ MediaSourceReader::SwitchVideoSource(int64_t* aTarget)
return SOURCE_EXISTING;
}
mVideoSourceDecoder = newDecoder;
GetVideoReader()->ResetDecode();
if (usedFuzz) {
// A decoder buffered range is continuous. We would have failed the exact
// search but succeeded the fuzzy one if our target was shortly before
@ -810,6 +812,7 @@ MediaSourceReader::OnVideoSeekFailed(nsresult aResult)
void
MediaSourceReader::DoAudioSeek()
{
GetAudioReader()->ResetDecode();
if (SwitchAudioSource(&mPendingSeekTime) == SOURCE_NONE) {
// Data we need got evicted since the last time we checked for data
// availability. Abort current seek attempt.
@ -860,9 +863,6 @@ MediaSourceReader::AttemptSeek()
}
ResetDecode();
for (uint32_t i = 0; i < mTrackBuffers.Length(); ++i) {
mTrackBuffers[i]->ResetDecode();
}
// Decoding discontinuity upon seek, reset last times to seek target.
mLastAudioTime = mPendingSeekTime;
@ -880,6 +880,7 @@ MediaSourceReader::AttemptSeek()
void
MediaSourceReader::DoVideoSeek()
{
GetVideoReader()->ResetDecode();
if (SwitchVideoSource(&mPendingSeekTime) == SOURCE_NONE) {
// Data we need got evicted since the last time we checked for data
// availability. Abort current seek attempt.

Просмотреть файл

@ -839,14 +839,6 @@ TrackBuffer::BreakCycles()
MOZ_ASSERT(!mParentDecoder);
}
void
TrackBuffer::ResetDecode()
{
for (uint32_t i = 0; i < mDecoders.Length(); ++i) {
mDecoders[i]->GetReader()->ResetDecode();
}
}
void
TrackBuffer::ResetParserState()
{

Просмотреть файл

@ -81,9 +81,6 @@ public:
void BreakCycles();
// Call ResetDecode() on each decoder in mDecoders.
void ResetDecode();
// Run MSE Reset Parser State Algorithm.
// 3.5.2 Reset Parser State
// http://w3c.github.io/media-source/#sourcebuffer-reset-parser-state