mirror of
https://github.com/opencv/opencv.git
synced 2025-07-26 07:07:37 +08:00
videoio(ffmpeg): fix memory leak
This commit is contained in:
parent
6390b50d6e
commit
eb067fee55
@ -1519,7 +1519,7 @@ bool CvCapture_FFMPEG::retrieveFrame(int flag, unsigned char** data, int* step,
|
|||||||
#if USE_AV_HW_CODECS
|
#if USE_AV_HW_CODECS
|
||||||
if (sw_picture != picture)
|
if (sw_picture != picture)
|
||||||
{
|
{
|
||||||
av_frame_unref(sw_picture);
|
av_frame_free(&sw_picture);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user