Bug 1195158. Part 5 - 1. Fix insufficient includes and sort out include order. 2. Only disconnect |mTimedMetadataListener| when the state machine is created. r=cpearce.

This commit is contained in:
JW Wang 2015-09-07 11:39:46 +08:00
Родитель 7cab08fca3
Коммит d5b1c53fd7
2 изменённых файлов: 14 добавлений и 12 удалений

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

@ -458,13 +458,12 @@ void MediaDecoder::Shutdown()
mShuttingDown = true;
mTimedMetadataListener.Disconnect();
// This changes the decoder state to SHUTDOWN and does other things
// necessary to unblock the state machine thread if it's blocked, so
// the asynchronous shutdown in nsDestroyStateMachine won't deadlock.
if (mDecoderStateMachine) {
mDecoderStateMachine->DispatchShutdown();
mTimedMetadataListener.Disconnect();
}
// Force any outstanding seek and byterange requests to complete

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

@ -184,6 +184,10 @@ destroying the MediaDecoder object.
#if !defined(MediaDecoder_h_)
#define MediaDecoder_h_
#ifdef MOZ_EME
#include "mozilla/CDMProxy.h"
#endif
#include "mozilla/MozPromise.h"
#include "mozilla/ReentrantMonitor.h"
#include "mozilla/StateMirroring.h"
@ -191,21 +195,20 @@ destroying the MediaDecoder object.
#include "mozilla/dom/AudioChannelBinding.h"
#include "nsISupports.h"
#include "necko-config.h"
#include "nsAutoPtr.h"
#include "nsCOMPtr.h"
#include "nsIObserver.h"
#include "nsAutoPtr.h"
#include "nsISupports.h"
#include "nsITimer.h"
#include "MediaResource.h"
#include "MediaDecoderOwner.h"
#include "MediaEventSource.h"
#include "MediaStreamGraph.h"
#include "AbstractMediaDecoder.h"
#include "DecodedStream.h"
#include "necko-config.h"
#ifdef MOZ_EME
#include "mozilla/CDMProxy.h"
#endif
#include "MediaDecoderOwner.h"
#include "MediaEventSource.h"
#include "MediaMetadataManager.h"
#include "MediaResource.h"
#include "MediaStreamGraph.h"
#include "TimeUnits.h"
class nsIStreamListener;