From 770fec0d88b26800b3310e3f0b350600735692da Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 13 Mar 2016 23:59:09 -0700 Subject: [PATCH] GUAC-236: Define av_frame_free() / av_frame_alloc() if not present. --- src/guacenc/video.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/guacenc/video.c b/src/guacenc/video.c index fbf02e03..a99cd4ee 100644 --- a/src/guacenc/video.c +++ b/src/guacenc/video.c @@ -38,6 +38,12 @@ #include #include +/* Define av_frame_alloc() / av_frame_free() if libavcodec is old */ +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,1) +#define av_frame_alloc avcodec_alloc_frame +#define av_frame_free avcodec_free_frame +#endif + guacenc_video* guacenc_video_alloc(const char* path, const char* codec_name, int width, int height, int bitrate) {