mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-02 22:06:14 +00:00
Use AV_CODEC_RECEIVE_FRAME_FLAG_SYNCHRONOUS for decoder probing on FFmpeg 8.1
This commit is contained in:
@@ -685,7 +685,12 @@ bool FFmpegVideoDecoder::completeInitialization(const AVCodec* decoder, enum AVP
|
||||
|
||||
// A few FFmpeg decoders (h264_mmal) process here using a "pull" model.
|
||||
// Those decoders will fail here if the format is not supported.
|
||||
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(62, 28, 100)
|
||||
err = avcodec_receive_frame_flags(m_VideoDecoderCtx, frame,
|
||||
AV_CODEC_RECEIVE_FRAME_FLAG_SYNCHRONOUS);
|
||||
#else
|
||||
err = avcodec_receive_frame(m_VideoDecoderCtx, frame);
|
||||
#endif
|
||||
if (err == AVERROR(EAGAIN)) {
|
||||
// Wait a little while to let the hardware work
|
||||
SDL_Delay(100);
|
||||
|
||||
Reference in New Issue
Block a user