From 2a4f751a4f52646363de0c551b3c8c7a64ecb93c Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 24 Aug 2017 12:00:48 -0400 Subject: [PATCH] ffmpeg versionc heck --- src/zm_ffmpeg_input.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/zm_ffmpeg_input.cpp b/src/zm_ffmpeg_input.cpp index 982c33dde..6c715b6d1 100644 --- a/src/zm_ffmpeg_input.cpp +++ b/src/zm_ffmpeg_input.cpp @@ -71,7 +71,9 @@ int FFmpeg_Input::Open( const char *filepath ) { if ((error = avcodec_open2( streams[i].context, streams[i].codec, NULL)) < 0) { Error( "Could not open input codec (error '%s')\n", av_make_error_string(error).c_str() ); +#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0) avcodec_free_context( &streams[i].context ); +#endif avformat_close_input(&input_format_context); return error; }