aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/command_classes/vic.cpp
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-08-08 00:51:25 -0400
committerameerj <52414509+ameerj@users.noreply.github.com>2021-08-09 23:24:16 -0400
commit8236b4f4d719633911c4aa84eed86d87387b7e81 (patch)
tree7510da87251a170614133348598aca9fffc8e40c /src/video_core/command_classes/vic.cpp
parent551b61a46e9db23924eb91d1b23669ceb37b0e64 (diff)
vic: Specify sws_scale height stride.
Silences a sws_scale runtime warning about unaligned strides.
Diffstat (limited to 'src/video_core/command_classes/vic.cpp')
-rw-r--r--src/video_core/command_classes/vic.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/video_core/command_classes/vic.cpp b/src/video_core/command_classes/vic.cpp
index d5e77941cd..0ee07f3982 100644
--- a/src/video_core/command_classes/vic.cpp
+++ b/src/video_core/command_classes/vic.cpp
@@ -96,12 +96,11 @@ void Vic::Execute() {
if (!converted_frame_buffer) {
converted_frame_buffer = AVMallocPtr{static_cast<u8*>(av_malloc(linear_size)), av_free};
}
-
- const int converted_stride{frame->width * 4};
+ const std::array<int, 4> converted_stride{frame->width * 4, frame->height * 4, 0, 0};
u8* const converted_frame_buf_addr{converted_frame_buffer.get()};
sws_scale(scaler_ctx, frame->data, frame->linesize, 0, frame->height,
- &converted_frame_buf_addr, &converted_stride);
+ &converted_frame_buf_addr, converted_stride.data());
const u32 blk_kind = static_cast<u32>(config.block_linear_kind);
if (blk_kind != 0) {