core: Resolve C4267 warning on MSVC

This commit is contained in:
Morph 2022-05-12 00:23:36 -04:00
parent 4e73ff3978
commit 3a43475149
7 changed files with 15 additions and 12 deletions

View file

@ -8,7 +8,8 @@
namespace VideoDumper {
VideoFrame::VideoFrame(std::size_t width_, std::size_t height_, u8* data_)
: width(width_), height(height_), stride(width * 4), data(data_, data_ + width * height * 4) {}
: width(width_), height(height_), stride(static_cast<u32>(width * 4)),
data(data_, data_ + width * height * 4) {}
Backend::~Backend() = default;
NullBackend::~NullBackend() = default;

View file

@ -354,7 +354,7 @@ void FFmpegAudioStream::ProcessFrame(const VariableAudioFrame& channel0,
}
auto resampled_count = swr_convert(swr_context.get(), dst_data.data(), frame_size - offset,
src_data.data(), channel0.size());
src_data.data(), static_cast<int>(channel0.size()));
if (resampled_count < 0) {
LOG_ERROR(Render, "Audio frame dropped: Could not resample data");
return;