GUAC-236: Define av_frame_free() / av_frame_alloc() if not present.

Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/770fec0d
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/770fec0d
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/770fec0d

Branch: refs/heads/master
Commit: 770fec0d88b26800b3310e3f0b350600735692da
Parents: 812f8b8
Author: Michael Jumper <[email protected]>
Authored: Sun Mar 13 23:59:09 2016 -0700
Committer: Michael Jumper <[email protected]>
Committed: Mon Mar 14 20:22:04 2016 -0700

----------------------------------------------------------------------
 src/guacenc/video.c | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/770fec0d/src/guacenc/video.c
----------------------------------------------------------------------
diff --git a/src/guacenc/video.c b/src/guacenc/video.c
index fbf02e0..a99cd4e 100644
--- a/src/guacenc/video.c
+++ b/src/guacenc/video.c
@@ -38,6 +38,12 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+/* 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) {
 

Reply via email to