diff --git a/content/media/plugins/MediaPluginDecoder.cpp b/content/media/plugins/MediaPluginDecoder.cpp index 8751d826446f..df20598c5e34 100644 --- a/content/media/plugins/MediaPluginDecoder.cpp +++ b/content/media/plugins/MediaPluginDecoder.cpp @@ -16,7 +16,7 @@ MediaPluginDecoder::MediaPluginDecoder(const nsACString& aType) : mType(aType) MediaDecoderStateMachine* MediaPluginDecoder::CreateStateMachine() { - return new MediaDecoderStateMachine(this, new MediaPluginReader(this)); + return new MediaDecoderStateMachine(this, new MediaPluginReader(this, mType)); } } // namespace mozilla diff --git a/content/media/plugins/MediaPluginReader.cpp b/content/media/plugins/MediaPluginReader.cpp index aef9e90758de..b8bec26a2507 100644 --- a/content/media/plugins/MediaPluginReader.cpp +++ b/content/media/plugins/MediaPluginReader.cpp @@ -15,8 +15,10 @@ namespace mozilla { -MediaPluginReader::MediaPluginReader(AbstractMediaDecoder *aDecoder) : +MediaPluginReader::MediaPluginReader(AbstractMediaDecoder *aDecoder, + const nsACString& aContentType) : MediaDecoderReader(aDecoder), + mType(aContentType), mPlugin(NULL), mHasAudio(false), mHasVideo(false), @@ -24,7 +26,6 @@ MediaPluginReader::MediaPluginReader(AbstractMediaDecoder *aDecoder) : mAudioSeekTimeUs(-1), mLastVideoFrame(NULL) { - static_cast(aDecoder)->GetContentType(mType); } MediaPluginReader::~MediaPluginReader() diff --git a/content/media/plugins/MediaPluginReader.h b/content/media/plugins/MediaPluginReader.h index f86f7f1fef3d..ea44397fc9e6 100644 --- a/content/media/plugins/MediaPluginReader.h +++ b/content/media/plugins/MediaPluginReader.h @@ -11,6 +11,8 @@ #include "MPAPI.h" +class nsACString; + namespace mozilla { class AbstractMediaDecoder; @@ -27,7 +29,8 @@ class MediaPluginReader : public MediaDecoderReader int64_t mAudioSeekTimeUs; VideoData *mLastVideoFrame; public: - MediaPluginReader(AbstractMediaDecoder* aDecoder); + MediaPluginReader(AbstractMediaDecoder* aDecoder, + const nsACString& aContentType); ~MediaPluginReader(); virtual nsresult Init(MediaDecoderReader* aCloneDonor);