From 53abc141437f906dc1fd5acf51a23c351441e958 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 20 May 2017 08:22:08 -0400 Subject: [PATCH] handle ffmpeg deprecations --- src/zm_video.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/zm_video.cpp b/src/zm_video.cpp index 82cb75d1d..ec1371ba3 100644 --- a/src/zm_video.cpp +++ b/src/zm_video.cpp @@ -70,7 +70,11 @@ X264MP4Writer::X264MP4Writer(const char* p_path, const unsigned int p_width, con /* Calculate the image sizes. We will need this for parameter checking */ zm_imgsize = colours * width * height; +#if LIBAVUTIL_VERSION_CHECK(54, 6, 0, 6, 0) + codec_imgsize = av_image_get_buffer_size( codec_pf, width, height, 1 ); +#else codec_imgsize = avpicture_get_size( codec_pf, width, height); +#endif if(!codec_imgsize) { Error("Failed calculating codec pixel format image size"); }