diff options
| author | 2020-11-26 14:04:06 -0500 | |
|---|---|---|
| committer | 2020-11-26 14:04:06 -0500 | |
| commit | 979b60273889f070737d1fe3037991245180ca67 (patch) | |
| tree | fa839d277e9e255d5a62143798ab4792d089cf38 | |
| parent | Address PR feedback (diff) | |
| download | yuzu-979b60273889f070737d1fe3037991245180ca67.tar.gz yuzu-979b60273889f070737d1fe3037991245180ca67.tar.xz yuzu-979b60273889f070737d1fe3037991245180ca67.zip | |
Limit queue size to 10 frames
Workaround for ZLA, which seems to decode and queue twice as many frames as it displays.
Diffstat (limited to '')
| -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() { | |||
| 104 | AVFramePtr frame = AVFramePtr{av_frame_alloc(), AVFrameDeleter}; | 104 | AVFramePtr frame = AVFramePtr{av_frame_alloc(), AVFrameDeleter}; |
| 105 | avcodec_receive_frame(av_codec_ctx, frame.get()); | 105 | avcodec_receive_frame(av_codec_ctx, frame.get()); |
| 106 | av_frames.push(std::move(frame)); | 106 | av_frames.push(std::move(frame)); |
| 107 | // Limit queue to 10 frames. Workaround for ZLA decode and queue spam | ||
| 108 | if (av_frames.size() > 10) { | ||
| 109 | av_frames.pop(); | ||
| 110 | } | ||
| 107 | } | 111 | } |
| 108 | } | 112 | } |
| 109 | 113 | ||