Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(video): fix CoreAV and VideoSurface to conform to new VideoFrame
Browse files Browse the repository at this point in the history
  • Loading branch information
initramfs committed Aug 3, 2016
1 parent 38b1a9b commit 277ddc3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/core/coreav.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/video/videosurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 277ddc3

Please sign in to comment.