Bug 1116284 - Don't run MP4Reader::Update after we've shut the reader down. r=cpearce

This commit is contained in:
Matt Woodrow 2015-01-12 09:43:11 +13:00
parent ec6db05d59
commit e8ab92a424
3 changed files with 6 additions and 2 deletions

View File

@ -74,10 +74,10 @@ MediaDecoderReader::MediaDecoderReader(AbstractMediaDecoder* aDecoder)
, mIgnoreAudioOutputFormat(false)
, mStartTime(-1)
, mHitAudioDecodeError(false)
, mShutdown(false)
, mTaskQueueIsBorrowed(false)
, mAudioDiscontinuity(false)
, mVideoDiscontinuity(false)
, mShutdown(false)
{
MOZ_COUNT_CTOR(MediaDecoderReader);
EnsureMediaPromiseLog();

View File

@ -300,6 +300,7 @@ protected:
// replace this with a promise-y mechanism as we make this stuff properly
// async.
bool mHitAudioDecodeError;
bool mShutdown;
private:
// Promises used only for the base-class (sync->async adapter) implementation
@ -314,7 +315,6 @@ private:
// "discontinuity" in the stream. For example after a seek.
bool mAudioDiscontinuity;
bool mVideoDiscontinuity;
bool mShutdown;
};
} // namespace mozilla

View File

@ -545,6 +545,10 @@ MP4Reader::Update(TrackType aTrack)
{
MOZ_ASSERT(GetTaskQueue()->IsCurrentThreadIn());
if (mShutdown) {
return;
}
// Record number of frames decoded and parsed. Automatically update the
// stats counters using the AutoNotifyDecoded stack-based class.
uint32_t parsed = 0, decoded = 0;