summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-10-29 22:35:52 -0400
committerLioncash <mathew1800@gmail.com>2020-10-29 22:35:55 -0400
commitbadea3b30134b02c6502c8174719f2c984e37524 (patch)
tree2150ccb6def283356ccb13ef6350f017bce5587e /src
parentf8543249f0e96a3148f3ea888bfa62882e67f523 (diff)
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.h2
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:
std::array<s8, 4> loop_filter_ref_deltas{};
std::array<s8, 2> loop_filter_mode_deltas{};
- bool hidden;
+ bool hidden = false;
s64 current_frame_number = -2; // since we buffer 2 frames
s32 grace_period = 6; // frame offsets need to stabilize
std::array<FrameContexts, 4> frame_ctxs{};