mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-27 22:35:40 +00:00
Limit queue size to 10 frames
Workaround for ZLA, which seems to decode and queue twice as many frames as it displays.
This commit is contained in:
parent
c9e3abe206
commit
979b602738
|
@ -104,6 +104,10 @@ void Codec::Decode() {
|
||||||
AVFramePtr frame = AVFramePtr{av_frame_alloc(), AVFrameDeleter};
|
AVFramePtr frame = AVFramePtr{av_frame_alloc(), AVFrameDeleter};
|
||||||
avcodec_receive_frame(av_codec_ctx, frame.get());
|
avcodec_receive_frame(av_codec_ctx, frame.get());
|
||||||
av_frames.push(std::move(frame));
|
av_frames.push(std::move(frame));
|
||||||
|
// Limit queue to 10 frames. Workaround for ZLA decode and queue spam
|
||||||
|
if (av_frames.size() > 10) {
|
||||||
|
av_frames.pop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue