]> git.sesse.net Git - vlc/commitdiff
Avcodec: create replacements for older versions of lavc
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 12 Mar 2013 13:06:46 +0000 (14:06 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 12 Mar 2013 15:44:48 +0000 (16:44 +0100)
Methods avcodec_alloc_context3, avcodec_open2 and error_recognition
member

modules/codec/avcodec/avcommon_compat.h

index b094223eac5d2966689621d0cce64d7671e5e51d..9cf651e5943570fe13aa64d8aef92413fcac543c 100644 (file)
@@ -471,6 +471,12 @@ enum {
 
 #endif /* LIBAVCODEC_VERSION < 54.25 */
 
+#if LIBAVCODEC_VERSION_MAJOR < 54
+# define avcodec_alloc_context3(a) avcodec_alloc_context()
+# define avcodec_open2(a, b, c) avcodec_open(a, b)
+# define err_recognition error_recognition
+#endif
+
 #endif /* HAVE_LIBAVCODEC_AVCODEC_H */
 
 #ifdef HAVE_LIBAVUTIL_AVUTIL_H