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

fix(video): fix CoreAV and VideoSurface to conform to new VideoFrame

This commit is contained in:
initramfs 2016-04-23 20:51:54 -04:00 committed by initramfs
parent 38b1a9b63d
commit 277ddc3d2f
No known key found for this signature in database
GPG Key ID: 78B8BDF87E9EF0AF
2 changed files with 7 additions and 2 deletions

View File

@ -362,7 +362,12 @@ void CoreAV::sendCallVideo(uint32_t callId, std::shared_ptr<VideoFrame> vframe)
// This frame shares vframe's buffers, we don't call vpx_img_free but just delete it
vpx_image* frame = vframe->toVpxImage();
if (frame->fmt == VPX_IMG_FMT_NONE)
if(!frame)
{
return;
}
if(frame->fmt == VPX_IMG_FMT_NONE)
{
qWarning() << "Invalid frame";
vpx_img_free(frame);

View File

@ -146,7 +146,7 @@ void VideoSurface::onNewFrameAvailable(std::shared_ptr<VideoFrame> newFrame)
lock();
lastFrame = newFrame;
newSize = lastFrame->getSize();
newSize = lastFrame->getSourceDimensions().size();
unlock();
float newRatio = getSizeRatio(newSize);