Skip to content

Commit

Permalink
[videoAVF] only copy valid images
Browse files Browse the repository at this point in the history
Closes: #376
Closes: #303
  • Loading branch information
IOhannes m zmölnig committed Dec 22, 2023
1 parent d8e09cc commit 34652c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/videoAVF/videoAVF.mm
Expand Up @@ -219,14 +219,14 @@
}
m_videoGrabber->lock.lock();
pixBlock*img = &[m_videoGrabber getCurrentFrame];
if(img) {
if(img && img->image.data && img->image.xsize && img->image.ysize) {
img->newfilm = (m_width != img->image.xsize) || (m_height != img->image.ysize);
m_width = img->image.xsize;
m_height = img->image.ysize;
img->image.copy2Image(&m_img.image);
m_img.newfilm = img->newfilm;
m_img.newimage = img->newimage;
}
img->image.copy2Image(&m_img.image);
m_img.newfilm = img->newfilm;
m_img.newimage = img->newimage;

return &m_img;
}
Expand Down

0 comments on commit 34652c9

Please sign in to comment.