1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor(video): static cast video dimensions to suppress warnings

This commit is contained in:
initramfs 2016-04-25 11:51:30 -04:00 committed by initramfs
parent 8bfbae1b47
commit 57f38e281b
No known key found for this signature in database
GPG Key ID: 78B8BDF87E9EF0AF

View File

@ -182,7 +182,12 @@ ToxAVFrame VideoFrame::toToxAVFrame(QSize frameSize)
if(frame)
{
ToxAVFrame ret {frameSize.width(), frameSize.height(), frame->data[0], frame->data[1], frame->data[2]};
ToxAVFrame ret
{
static_cast<std::uint16_t>(frameSize.width()),
static_cast<std::uint16_t>(frameSize.height()),
frame->data[0], frame->data[1], frame->data[2]
};
frameLock.unlock();
return ret;
@ -203,7 +208,12 @@ ToxAVFrame VideoFrame::toToxAVFrame(QSize frameSize)
storeAVFrame(frame, frameSize, static_cast<int>(AV_PIX_FMT_YUV420P));
ToxAVFrame ret {frameSize.width(), frameSize.height(), frame->data[0], frame->data[1], frame->data[2]};
ToxAVFrame ret
{
static_cast<std::uint16_t>(frameSize.width()),
static_cast<std::uint16_t>(frameSize.height()),
frame->data[0], frame->data[1], frame->data[2]
};
frameLock.unlock();
return ret;