зеркало из https://github.com/mozilla/gecko-dev.git
Bug 894341 - Stop encoding data when the eos flag has written to ContainerWriter. r=roc
This commit is contained in:
Родитель
ff44208bca
Коммит
32d3b06b96
|
@ -184,7 +184,6 @@ MediaEncoder::GetEncodedData(nsTArray<nsTArray<uint8_t> >* aOutputBufs,
|
|||
if (NS_SUCCEEDED(rv)) {
|
||||
// Successfully get the copy of final container data from writer.
|
||||
reloop = false;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// No more headers, starts to encode tracks.
|
||||
|
@ -219,7 +218,6 @@ MediaEncoder::GetEncodedData(nsTArray<nsTArray<uint8_t> >* aOutputBufs,
|
|||
if (NS_SUCCEEDED(rv)) {
|
||||
// Successfully get the copy of final container data from writer.
|
||||
reloop = false;
|
||||
break;
|
||||
}
|
||||
|
||||
mState = (mAudioEncoder->IsEncodingComplete()) ? ENCODE_DONE : ENCODE_TRACK;
|
||||
|
|
|
@ -183,7 +183,7 @@ OpusTrackEncoder::GetHeader(nsTArray<uint8_t>* aOutput)
|
|||
}
|
||||
}
|
||||
|
||||
if (mCanceled) {
|
||||
if (mCanceled || mDoneEncoding) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,7 @@ OpusTrackEncoder::GetEncodedTrack(nsTArray<uint8_t>* aOutput,
|
|||
mReentrantMonitor.Wait();
|
||||
}
|
||||
|
||||
if (mCanceled) {
|
||||
if (mCanceled || mDoneEncoding) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче