diff options
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 | ||