diff options
author | ameerj <aj662@drexel.edu> | 2020-11-26 20:04:06 +0100 |
---|---|---|
committer | ameerj <aj662@drexel.edu> | 2020-11-26 20:04:06 +0100 |
commit | 979b60273889f070737d1fe3037991245180ca67 (patch) | |
tree | fa839d277e9e255d5a62143798ab4792d089cf38 /src/video_core/command_classes/codecs/codec.cpp | |
parent | Address PR feedback (diff) | |
download | yuzu-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 'src/video_core/command_classes/codecs/codec.cpp')
-rw-r--r-- | src/video_core/command_classes/codecs/codec.cpp | 4 |
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(); + } } } |