mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 714445: nsWebMReader should not read preferences off the main thread. r=roc
This commit is contained in:
parent
e7bb002491
commit
dca538b319
@ -137,9 +137,12 @@ nsWebMReader::nsWebMReader(nsBuiltinDecoder* aDecoder)
|
||||
mAudioStartUsec(-1),
|
||||
mAudioFrames(0),
|
||||
mHasVideo(false),
|
||||
mHasAudio(false)
|
||||
mHasAudio(false),
|
||||
mForceStereoMode(0)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsWebMReader);
|
||||
|
||||
Preferences::GetInt("media.webm.force_stereo_mode", &mForceStereoMode);
|
||||
}
|
||||
|
||||
nsWebMReader::~nsWebMReader()
|
||||
@ -306,10 +309,7 @@ nsresult nsWebMReader::ReadMetadata(nsVideoInfo* aInfo)
|
||||
break;
|
||||
}
|
||||
|
||||
PRInt32 forceStereoMode;
|
||||
if (NS_SUCCEEDED(Preferences::GetInt("media.webm.force_stereo_mode",
|
||||
&forceStereoMode))) {
|
||||
switch (forceStereoMode) {
|
||||
switch (mForceStereoMode) {
|
||||
case 1:
|
||||
mInfo.mStereoMode = STEREO_MODE_LEFT_RIGHT;
|
||||
break;
|
||||
@ -326,7 +326,6 @@ nsresult nsWebMReader::ReadMetadata(nsVideoInfo* aInfo)
|
||||
mInfo.mStereoMode = STEREO_MODE_MONO;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!mHasAudio && type == NESTEGG_TRACK_AUDIO) {
|
||||
nestegg_audio_params params;
|
||||
r = nestegg_track_audio_params(mContext, track, ¶ms);
|
||||
|
@ -240,6 +240,10 @@ private:
|
||||
// Booleans to indicate if we have audio and/or video data
|
||||
bool mHasVideo;
|
||||
bool mHasAudio;
|
||||
|
||||
// Value of the "media.webm.force_stereo_mode" pref, which we need off the
|
||||
// main thread.
|
||||
PRInt32 mForceStereoMode;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user