make sure that the empty mat is copied to UMat properly - i.e. UMat becomes empty. Before the patch such copy operation crashed

pull/7398/head
Vadim Pisarevsky 8 years ago
parent e0435d3b8a
commit 83f2eb79f1
  1. 5
      modules/core/src/copy.cpp
  2. 2
      modules/videoio/src/cap_avfoundation_mac.mm

@ -263,6 +263,11 @@ void Mat::copyTo( OutputArray _dst ) const
if( _dst.isUMat() )
{
if( empty() )
{
_dst.release();
return;
}
_dst.create( dims, size.p, type() );
UMat dst = _dst.getUMat();

@ -118,7 +118,6 @@ private:
int height;
int settingWidth;
int settingHeight;
OSType mInputPixelFormat;
int started;
};
@ -163,7 +162,6 @@ private:
CMTime mFrameTimestamp;
size_t mFrameNum;
OSType mInputPixelFormat;
int started;
};

Loading…
Cancel
Save