mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-18 06:10:07 +00:00
Use new LiRequestIdrFrame() API
This commit is contained in:
@@ -1108,6 +1108,10 @@ void FFmpegVideoDecoder::decoderThreadProc()
|
||||
// Don't consume any additional data
|
||||
SDL_AtomicSet(&m_DecoderThreadShouldQuit, 1);
|
||||
}
|
||||
|
||||
// Just in case the error resulted in the loss of the frame,
|
||||
// request an IDR frame to reset our decoder state.
|
||||
LiRequestIdrFrame();
|
||||
}
|
||||
} while (err == AVERROR(EAGAIN) && !SDL_AtomicGet(&m_DecoderThreadShouldQuit));
|
||||
|
||||
@@ -1131,11 +1135,6 @@ int FFmpegVideoDecoder::submitDecodeUnit(PDECODE_UNIT du)
|
||||
return DR_NEED_IDR;
|
||||
}
|
||||
|
||||
// Bail immediately if we need an IDR frame to continue
|
||||
if (Session::get()->getAndClearPendingIdrFrameStatus()) {
|
||||
return DR_NEED_IDR;
|
||||
}
|
||||
|
||||
if (!m_LastFrameNumber) {
|
||||
m_ActiveWndVideoStats.measurementStartTimestamp = SDL_GetTicks();
|
||||
m_LastFrameNumber = du->frameNumber;
|
||||
|
||||
Reference in New Issue
Block a user