summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-08-08 08:04:56 +0200
committerAnton Khirnov <anton@khirnov.net>2012-08-10 18:48:40 +0200
commit2ff67c909c95903240c30405b0b231ba68f5407a (patch)
tree72931b74d3665e3c6136b6f723ad70334881acdf /libavcodec/avcodec.h
parent33de86db2bda850d97e04c4fd132c223c7249333 (diff)
lavc: fix mixing CODEC_ID/AV_CODEC_ID in C++ code.
C++ does not allow to mix different enums, so e.g. code comparing ACodecID with CodecID would fail to compile with gcc. This very evil hack should fix this problem.
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index b807ae4bf3..8c28b6538a 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -76,9 +76,6 @@
* @{
*/
-#if FF_API_CODEC_ID
-#include "old_codec_ids.h"
-#endif
/**
* Identify the syntax and semantics of the bitstream.
@@ -428,8 +425,16 @@ enum AVCodecID {
AV_CODEC_ID_MPEG4SYSTEMS = 0x20001, /**< _FAKE_ codec to indicate a MPEG-4 Systems
* stream (only used by libavformat) */
AV_CODEC_ID_FFMETADATA = 0x21000, ///< Dummy codec for streams containing only metadata information.
+
+#if FF_API_CODEC_ID
+#include "old_codec_ids.h"
+#endif
};
+#if FF_API_CODEC_ID
+#define CodecID AVCodecID
+#endif
+
#if FF_API_OLD_DECODE_AUDIO
/* in bytes */
#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio