aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/command_classes/codecs/vp9.cpp
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-08-08 13:49:00 -0400
committerameerj <52414509+ameerj@users.noreply.github.com>2021-08-08 13:49:00 -0400
commitfa226957050816280bfd7aad3458fe8408118ece (patch)
tree41c91efafdfc273ecb7c25802d57d549ed3695ba /src/video_core/command_classes/codecs/vp9.cpp
parent63325cafbe44cfa592fb03b0d68af1cf4a792c5b (diff)
vp9: Ensure the first frame is complete
Silences a runtime error due to the first frame missing the frame data, and being set to hidden despite being a key-frame.
Diffstat (limited to 'src/video_core/command_classes/codecs/vp9.cpp')
-rw-r--r--src/video_core/command_classes/codecs/vp9.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/command_classes/codecs/vp9.cpp b/src/video_core/command_classes/codecs/vp9.cpp
index 7eecb3991..70030066a 100644
--- a/src/video_core/command_classes/codecs/vp9.cpp
+++ b/src/video_core/command_classes/codecs/vp9.cpp
@@ -397,14 +397,14 @@ Vp9FrameContainer VP9::GetCurrentFrame(const NvdecCommon::NvdecRegisters& state)
next_frame = std::move(temp);
} else {
next_frame.info = current_frame.info;
- next_frame.bit_stream = std::move(current_frame.bit_stream);
+ next_frame.bit_stream = current_frame.bit_stream;
}
return current_frame;
}
std::vector<u8> VP9::ComposeCompressedHeader() {
VpxRangeEncoder writer{};
- const bool update_probs = current_frame_info.show_frame && !current_frame_info.is_key_frame;
+ const bool update_probs = !current_frame_info.is_key_frame && current_frame_info.show_frame;
if (!current_frame_info.lossless) {
if (static_cast<u32>(current_frame_info.transform_mode) >= 3) {
writer.Write(3, 2);