Bug 1119936 - Audio from FM Radio or Music app ceases to play when switching between front/back camera. r=roc

This commit is contained in:
Alastor Wu 2015-03-09 15:41:51 +08:00
Родитель aed07e3b58
Коммит 36914534af
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -693,9 +693,11 @@ void HTMLMediaElement::AbortExistingLoads()
if (mNetworkState != nsIDOMHTMLMediaElement::NETWORK_EMPTY) {
NS_ASSERTION(!mDecoder && !mSrcStream, "How did someone setup a new stream/decoder already?");
// ChangeNetworkState() will call UpdateAudioChannelPlayingState()
// indirectly which depends on mPaused. So we need to update mPaused first.
mPaused = true;
ChangeNetworkState(nsIDOMHTMLMediaElement::NETWORK_EMPTY);
ChangeReadyState(nsIDOMHTMLMediaElement::HAVE_NOTHING);
mPaused = true;
if (fireTimeUpdate) {
// Since we destroyed the decoder above, the current playback position