diff options
| author | 2020-10-29 22:35:52 -0400 | |
|---|---|---|
| committer | 2020-10-29 22:35:55 -0400 | |
| commit | badea3b30134b02c6502c8174719f2c984e37524 (patch) | |
| tree | 2150ccb6def283356ccb13ef6350f017bce5587e /src | |
| parent | vp9: Make some member functions internally linked (diff) | |
| download | yuzu-badea3b30134b02c6502c8174719f2c984e37524.tar.gz yuzu-badea3b30134b02c6502c8174719f2c984e37524.tar.xz yuzu-badea3b30134b02c6502c8174719f2c984e37524.zip | |
vp9: Provide a default initializer for "hidden" member
The API of VP9 exposes a WasFrameHidden() function which accesses this
member. Given the constructor previously didn't initialize this member,
it's a potential vector for an uninitialized read.
Instead, we can initialize this to a deterministic value to prevent that
from occurring.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/command_classes/codecs/vp9.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video_core/command_classes/codecs/vp9.h b/src/video_core/command_classes/codecs/vp9.h index 3826f2c95..94e8f9090 100644 --- a/src/video_core/command_classes/codecs/vp9.h +++ b/src/video_core/command_classes/codecs/vp9.h | |||
| @@ -159,7 +159,7 @@ private: | |||
| 159 | std::array<s8, 4> loop_filter_ref_deltas{}; | 159 | std::array<s8, 4> loop_filter_ref_deltas{}; |
| 160 | std::array<s8, 2> loop_filter_mode_deltas{}; | 160 | std::array<s8, 2> loop_filter_mode_deltas{}; |
| 161 | 161 | ||
| 162 | bool hidden; | 162 | bool hidden = false; |
| 163 | s64 current_frame_number = -2; // since we buffer 2 frames | 163 | s64 current_frame_number = -2; // since we buffer 2 frames |
| 164 | s32 grace_period = 6; // frame offsets need to stabilize | 164 | s32 grace_period = 6; // frame offsets need to stabilize |
| 165 | std::array<FrameContexts, 4> frame_ctxs{}; | 165 | std::array<FrameContexts, 4> frame_ctxs{}; |