Provide support for older versions of libavcodec
authorDan Church <dchurch@g2planet.com>
Fri, 29 Dec 2017 16:59:45 +0000 (10:59 -0600)
committerDan Church <dchurch@g2planet.com>
Fri, 29 Dec 2017 17:13:03 +0000 (11:13 -0600)
My method was to find the LIBAVUTIL_VERSION_* at the commit where the
updated AV_ prefixed constants became available, add one "micro" version
to it, then if it's not at least that version, provide the unprefixed
constant. It just so happens that the same commit introduced all
the AV_* constants.

channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
libfreerdp/codec/h264_ffmpeg.c

index 8ead90b..40d0941 100644 (file)
 #define AV_CODEC_ID_AC3 CODEC_ID_AC3
 #endif
 
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56, 34, 2)
+#define AV_CODEC_CAP_TRUNCATED CODEC_CAP_TRUNCATED
+#define AV_CODEC_FLAG_TRUNCATED CODEC_FLAG_TRUNCATED
+#endif
+
 #if LIBAVUTIL_VERSION_MAJOR < 52
 #define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P
 #endif
index 2ab730a..3107769 100644 (file)
 #define AV_CODEC_ID_H264 CODEC_ID_H264
 #endif
 
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56, 34, 2)
+#define AV_CODEC_FLAG_LOOP_FILTER CODEC_FLAG_LOOP_FILTER
+#define AV_CODEC_CAP_TRUNCATED CODEC_CAP_TRUNCATED
+#define AV_CODEC_FLAG_TRUNCATED CODEC_FLAG_TRUNCATED
+#endif
+
 #if LIBAVUTIL_VERSION_MAJOR < 52
 #define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P
 #endif