Commit 770ce7db authored by Ilkka Ollakka's avatar Ilkka Ollakka

avcodec: move version check to avcodec.h

parent 58dfd2dc
...@@ -278,6 +278,16 @@ int ffmpeg_OpenCodec( decoder_t *p_dec ); ...@@ -278,6 +278,16 @@ int ffmpeg_OpenCodec( decoder_t *p_dec );
# define HAVE_AVCODEC_MT # define HAVE_AVCODEC_MT
#endif #endif
/* LIBAVCODEC_VERSION_CHECK checks for the right version of libav and FFmpeg
* a is the major version
* b and c the minor and micro versions of libav
* d and e the minor and micro versions of FFmpeg */
#define LIBAVCODEC_VERSION_CHECK( a, b, c, d, e ) \
(LIBAVCODEC_VERSION_MICRO < 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \
(LIBAVCODEC_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, d, e ) )
/* Uncomment it to enable compilation with vaapi/dxva2/vda (you also must change the build /* Uncomment it to enable compilation with vaapi/dxva2/vda (you also must change the build
* system) */ * system) */
//#define HAVE_AVCODEC_VAAPI 1 //#define HAVE_AVCODEC_VAAPI 1
......
...@@ -36,14 +36,6 @@ ...@@ -36,14 +36,6 @@
#endif #endif
#include "avcodec.h" #include "avcodec.h"
/* LIBAVCODEC_VERSION_CHECK checks for the right version of libav and FFmpeg
* a is the major version
* b and c the minor and micro versions of libav
* d and e the minor and micro versions of FFmpeg */
#define LIBAVCODEC_VERSION_CHECK( a, b, c, d, e ) \
(LIBAVCODEC_VERSION_MICRO < 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \
(LIBAVCODEC_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( a, d, e ) )
/***************************************************************************** /*****************************************************************************
* Codec fourcc -> ffmpeg_id mapping * Codec fourcc -> ffmpeg_id mapping
*****************************************************************************/ *****************************************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment