mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-22 16:17:20 +00:00
Use new LiRequestIdrFrame() API
This commit is contained in:
1 parent
f8c7e2ee41
commit
fbbbd5e0b8
4 files changed
+7
-22
No files matched your search
@@ -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