diff options
| author | Lioncash <mathew1800@gmail.com> | 2020-10-30 16:13:29 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2020-11-02 02:45:15 -0500 |
| commit | 4f0f481f63d0d5587a6d6d319f9815de87ed79ec (patch) | |
| tree | e35c6800340cec5f104e094a377c69ccc3dd101f /src/video_core/command_classes/codecs/h264.cpp | |
| parent | 14a97d082e996a22ff8aa7b57c3ed6fe5912b9cf (diff) | |
nvdec: Make use of [[nodiscard]] where applicable
Prevents bugs from occurring where the results of a function are
accidentally discarded
Diffstat (limited to 'src/video_core/command_classes/codecs/h264.cpp')
| -rw-r--r-- | src/video_core/command_classes/codecs/h264.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video_core/command_classes/codecs/h264.cpp b/src/video_core/command_classes/codecs/h264.cpp index 549a40f52..33e063e20 100644 --- a/src/video_core/command_classes/codecs/h264.cpp +++ b/src/video_core/command_classes/codecs/h264.cpp @@ -43,7 +43,8 @@ H264::H264(GPU& gpu_) : gpu(gpu_) {} H264::~H264() = default; -std::vector<u8>& H264::ComposeFrameHeader(NvdecCommon::NvdecRegisters& state, bool is_first_frame) { +const std::vector<u8>& H264::ComposeFrameHeader(NvdecCommon::NvdecRegisters& state, + bool is_first_frame) { H264DecoderContext context{}; gpu.MemoryManager().ReadBlock(state.picture_info_offset, &context, sizeof(H264DecoderContext)); |
