Commit 5e192e1e authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

AVformat: use a similar compat detection than AVcodec

parent 328a034c
......@@ -506,4 +506,18 @@ enum {
#endif /* HAVE_LIBAVUTIL_AVUTIL_H */
#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
# include <libavformat/avformat.h>
#define LIBAVFORMAT_VERSION_CHECK( a, b, c, d, e ) \
( (LIBAVFORMAT_VERSION_MICRO < 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, b, c ) ) || \
(LIBAVFORMAT_VERSION_MICRO >= 100 && LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT( a, d, e ) ) )
#if LIBAVFORMAT_VERSION_MAJOR < 54
# define AVDictionaryEntry AVMetadataTag
# define av_dict_get av_metadata_get
#endif
#endif
#endif
......@@ -38,21 +38,14 @@
#include <vlc_charset.h>
#include <vlc_avcodec.h>
#include <libavformat/avformat.h>
#include "../../codec/avcodec/avcodec.h"
#include "../../codec/avcodec/chroma.h"
#include "../../codec/avcodec/avcommon.h"
#include "../../codec/avcodec/avcommon_compat.h"
#include "avformat.h"
#include "../xiph.h"
#include "../vobsub.h"
/* Support for deprecated APIs */
#if LIBAVFORMAT_VERSION_MAJOR < 54
# define AVDictionaryEntry AVMetadataTag
# define av_dict_get av_metadata_get
#endif
#include <libavformat/avformat.h>
//#define AVFORMAT_DEBUG 1
......
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