Bug 1073792 - Refresh WMF output types on discontinuities, to catch cases where WMF doesn't notify us of an output type change. r=kinetik

This commit is contained in:
Chris Pearce 2014-09-30 11:59:15 +13:00
Родитель 1c8f998202
Коммит 95bdb7948d
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -256,6 +256,13 @@ WMFAudioMFTManager::Output(int64_t aStreamOffset,
mAudioFrameOffset = 0;
}
mMustRecaptureAudioPosition = false;
// Also update the output type, in case this segment has a different
// rate. This also triggers on the first sample, which can have a
// different rate than is advertised in the container, and sometimes
// we don't get a MF_E_TRANSFORM_STREAM_CHANGE when the rate changes.
hr = UpdateOutputType();
NS_ENSURE_TRUE(SUCCEEDED(hr), hr);
}
MOZ_ASSERT(numFramesToStrip >= 0);
int32_t offset = std::min<int32_t>(numFramesToStrip, numFrames);