[vlc-devel] [PATCH 7/7] avcodec: provide an alias for older libavcodec versions
Jean-Baptiste Kempf
jb at videolan.org
Tue Mar 12 14:30:23 CET 2013
---
modules/codec/avcodec/avcommon_compat.h | 1 +
modules/codec/avcodec/video.c | 4 ----
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h
index 574d4fe..9cf651e 100644
--- a/modules/codec/avcodec/avcommon_compat.h
+++ b/modules/codec/avcodec/avcommon_compat.h
@@ -474,6 +474,7 @@ enum {
#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 */
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 83d5b24..ab5bc66 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -212,11 +212,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
/* ***** Get configuration of ffmpeg plugin ***** */
p_sys->p_context->workaround_bugs =
var_InheritInteger( p_dec, "avcodec-workaround-bugs" );
-#if LIBAVCODEC_VERSION_MAJOR < 54
- p_sys->p_context->error_recognition =
-#else
p_sys->p_context->err_recognition =
-#endif
var_InheritInteger( p_dec, "avcodec-error-resilience" );
if( var_CreateGetBool( p_dec, "grayscale" ) )
--
1.8.1.5
More information about the vlc-devel
mailing list