diff --git a/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp b/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp index bd1308519..1aa45fc5a 100644 --- a/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp +++ b/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp @@ -11,6 +11,20 @@ #include #include +// Changes for FFMpeg version greater than 0.6 +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 64, 0) +#define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO +#define CODEC_TYPE_VIDEO AVMEDIA_TYPE_VIDEO +#endif + +#ifdef AVERROR +#define AVERROR_IO AVERROR(EIO) +#define AVERROR_NUMEXPECTED AVERROR(EDOM) +#define AVERROR_NOMEM AVERROR(ENOMEM) +#define AVERROR_NOFMT AVERROR(EILSEQ) +#define AVERROR_NOTSUPP AVERROR(ENOSYS) +#define AVERROR_NOENT AVERROR(ENOENT) +#endif namespace osgFFmpeg { diff --git a/src/osgPlugins/ffmpeg/FFmpegParameters.cpp b/src/osgPlugins/ffmpeg/FFmpegParameters.cpp index bfa1819f3..db1736bf3 100644 --- a/src/osgPlugins/ffmpeg/FFmpegParameters.cpp +++ b/src/osgPlugins/ffmpeg/FFmpegParameters.cpp @@ -5,6 +5,15 @@ #include #include +#if LIBAVCODEC_VERSION_MAJOR >= 53 +extern "C" +{ + #include +} +#define av_parse_video_frame_size av_parse_video_size +#define av_parse_video_frame_rate av_parse_video_rate +#endif + #if LIBAVCODEC_VERSION_MAJOR >= 53 || \ (LIBAVCODEC_VERSION_MAJOR==52 && LIBAVCODEC_VERSION_MINOR>=49)