From 95bdb7948d9f2cdd805e0beafa86ccb3dbad6ad1 Mon Sep 17 00:00:00 2001 From: Chris Pearce Date: Tue, 30 Sep 2014 11:59:15 +1300 Subject: [PATCH] Bug 1073792 - Refresh WMF output types on discontinuities, to catch cases where WMF doesn't notify us of an output type change. r=kinetik --- content/media/fmp4/wmf/WMFAudioMFTManager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/content/media/fmp4/wmf/WMFAudioMFTManager.cpp b/content/media/fmp4/wmf/WMFAudioMFTManager.cpp index a22bb8d2d163..ec785894b14e 100644 --- a/content/media/fmp4/wmf/WMFAudioMFTManager.cpp +++ b/content/media/fmp4/wmf/WMFAudioMFTManager.cpp @@ -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(numFramesToStrip, numFrames);