Merge pull request #19663 from mshabunin:fix-ffmpeg-1x

This commit is contained in:
Alexander Alekhin 2021-03-02 12:19:00 +00:00
commit 325bdf952c

View File

@ -1469,9 +1469,12 @@ bool CvCapture_FFMPEG::retrieveFrame(int, unsigned char** data, int* step, int*
*height = frame.height;
*cn = frame.cn;
if (sw_picture != picture) {
#if USE_AV_HW_CODECS
if (sw_picture != picture)
{
av_frame_unref(sw_picture);
}
#endif
return true;
}