Commit 6a3a6416 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #3698 from SpecLad:avcodec-free-frame

parents 9e3a8262 77578d41
......@@ -300,7 +300,15 @@ void CvCapture_FFMPEG::close()
}
if( picture )
{
// FFmpeg and Libav added avcodec_free_frame in different versions.
#if LIBAVCODEC_BUILD >= (LIBAVCODEC_VERSION_MICRO >= 100 \
? CALC_FFMPEG_VERSION(54, 59, 100) : CALC_FFMPEG_VERSION(54, 28, 0))
avcodec_free_frame(&picture);
#else
av_free(picture);
#endif
}
if( video_st )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment