Skip to content

Commit 137ec1c

Browse files
committed
videoio: av_frame_unref compilation fix
1 parent b0afb4d commit 137ec1c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/videoio/src/cap_ffmpeg_impl.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1469,9 +1469,12 @@ bool CvCapture_FFMPEG::retrieveFrame(int, unsigned char** data, int* step, int*
14691469
*height = frame.height;
14701470
*cn = frame.cn;
14711471

1472-
if (sw_picture != picture) {
1472+
#if USE_AV_HW_CODECS
1473+
if (sw_picture != picture)
1474+
{
14731475
av_frame_unref(sw_picture);
14741476
}
1477+
#endif
14751478
return true;
14761479
}
14771480

0 commit comments

Comments
 (0)