From Wang Rui, "I've found that the latest ffmpeg made some functions and macros

deprecated, which led to compilation errors in the OSG plugin. I tried
fixing them and tested with the version ffmpeg-git-5d4fd1d (ffmpeg
version > 0.8, libavcodec = 53.7.0) under Windows.
"
This commit is contained in:
Robert Osfield
2011-07-15 10:24:23 +00:00
parent 147455866f
commit f0bdbea926
2 changed files with 23 additions and 0 deletions

View File

@@ -11,6 +11,20 @@
#include <string.h>
#include <iostream>
// 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 {