mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 972246 - Keep sending EOS signal unitl OMXVideoEncoder actually receive it. r=roc
This commit is contained in:
parent
87c19ce54e
commit
c571b8f73a
@ -112,12 +112,16 @@ OmxVideoTrackEncoder::GetEncodedTrack(EncodedFrameContainer& aData)
|
||||
|
||||
// Send the EOS signal to OMXCodecWrapper.
|
||||
if (mEndOfStream && iter.IsEnded() && !mEosSetInEncoder) {
|
||||
mEosSetInEncoder = true;
|
||||
uint64_t totalDurationUs = mTotalFrameDuration * USECS_PER_S / mTrackRate;
|
||||
layers::Image* img = (!mLastFrame.GetImage() || mLastFrame.GetForceBlack())
|
||||
? nullptr : mLastFrame.GetImage();
|
||||
mEncoder->Encode(img, mFrameWidth, mFrameHeight, totalDurationUs,
|
||||
OMXCodecWrapper::BUFFER_EOS);
|
||||
nsresult result = mEncoder->Encode(img, mFrameWidth, mFrameHeight,
|
||||
totalDurationUs,
|
||||
OMXCodecWrapper::BUFFER_EOS);
|
||||
// Keep sending EOS signal until OMXVideoEncoder gets it.
|
||||
if (result == NS_OK) {
|
||||
mEosSetInEncoder = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Dequeue an encoded frame from the output buffers of OMXCodecWrapper.
|
||||
|
Loading…
Reference in New Issue
Block a user