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:
parent
38b1a9b63d
commit
277ddc3d2f
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user