summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorameerj <aj662@drexel.edu>2020-11-26 20:04:06 +0100
committerameerj <aj662@drexel.edu>2020-11-26 20:04:06 +0100
commit979b60273889f070737d1fe3037991245180ca67 (patch)
treefa839d277e9e255d5a62143798ab4792d089cf38 /src/video_core
parentAddress PR feedback (diff)
downloadyuzu-979b60273889f070737d1fe3037991245180ca67.tar
yuzu-979b60273889f070737d1fe3037991245180ca67.tar.gz
yuzu-979b60273889f070737d1fe3037991245180ca67.tar.bz2
yuzu-979b60273889f070737d1fe3037991245180ca67.tar.lz
yuzu-979b60273889f070737d1fe3037991245180ca67.tar.xz
yuzu-979b60273889f070737d1fe3037991245180ca67.tar.zst
yuzu-979b60273889f070737d1fe3037991245180ca67.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/command_classes/codecs/codec.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/command_classes/codecs/codec.cpp b/src/video_core/command_classes/codecs/codec.cpp
index 412e1e41c..9a88f64e4 100644
--- a/src/video_core/command_classes/codecs/codec.cpp
+++ b/src/video_core/command_classes/codecs/codec.cpp
@@ -104,6 +104,10 @@ void Codec::Decode() {
AVFramePtr frame = AVFramePtr{av_frame_alloc(), AVFrameDeleter};
avcodec_receive_frame(av_codec_ctx, frame.get());
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();
+ }
}
}