summaryrefslogtreecommitdiff
path: root/src/combined/ffmpeg/ffmpeg_compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/combined/ffmpeg/ffmpeg_compat.h')
-rw-r--r--src/combined/ffmpeg/ffmpeg_compat.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/combined/ffmpeg/ffmpeg_compat.h b/src/combined/ffmpeg/ffmpeg_compat.h
index 9a8aaf203..10205c84f 100644
--- a/src/combined/ffmpeg/ffmpeg_compat.h
+++ b/src/combined/ffmpeg/ffmpeg_compat.h
@@ -43,6 +43,27 @@
# undef AVCODEC_HAS_REORDERED_OPAQUE
#endif
+/**/
+#if LIBAVCODEC_VERSION_MAJOR > 53 || (LIBAVCODEC_VERSION_MAJOR == 53 && LIBAVCODEC_VERSION_MINOR >= 8)
+# define avcodec_init() do {} while(0)
+#endif
+
+/* avcodec_alloc_context() */
+#if LIBAVCODEC_VERSION_MAJOR >= 54 || (LIBAVCODEC_VERSION_MAJOR == 53 && LIBAVCODEC_VERSION_MINOR >= 6)
+# define AVCONTEXT 3
+# define avcodec_alloc_context() avcodec_alloc_context3(NULL)
+#else
+# define AVCONTEXT 1
+#endif
+
+/* avcodec_open() */
+#if LIBAVCODEC_VERSION_MAJOR >= 54 || (LIBAVCODEC_VERSION_MAJOR == 53 && LIBAVCODEC_VERSION_MINOR >= 6)
+# define AVOPEN 2
+# define avcodec_open(ctx,codec) avcodec_open2(ctx, codec, NULL)
+#else
+# define AVOPEN 1
+#endif
+
/* avcodec_thread_init() */
#if LIBAVCODEC_VERSION_MAJOR >= 53 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 112)
# define DEPRECATED_AVCODEC_THREAD_INIT 1