[FFmpeg-cvslog] avio: left-shift AVIO_ flags on next bump
Anton Khirnov
git at videolan.org
Thu Apr 14 03:24:36 CEST 2011
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Apr 13 07:35:35 2011 +0200| [cbea3ac8203690dec29c473399a50f8f6bb76c47] | committer: Anton Khirnov
avio: left-shift AVIO_ flags on next bump
Now AVIO_RDONLY is defined as 0, so it's not usable as a flag.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cbea3ac8203690dec29c473399a50f8f6bb76c47
---
libavformat/avio.h | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/libavformat/avio.h b/libavformat/avio.h
index b980d49..a4109a2 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -537,9 +537,15 @@ int url_resetbuf(AVIOContext *s, int flags);
* constants, optionally ORed with other flags.
* @{
*/
+#if LIBAVFORMAT_VERSION_MAJOR < 53
#define AVIO_RDONLY 0 /**< read-only */
#define AVIO_WRONLY 1 /**< write-only */
#define AVIO_RDWR 2 /**< read-write */
+#else
+#define AVIO_RDONLY 1 /**< read-only */
+#define AVIO_WRONLY 2 /**< write-only */
+#define AVIO_RDWR 4 /**< read-write */
+#endif
/**
* @}
*/
@@ -556,7 +562,11 @@ int url_resetbuf(AVIOContext *s, int flags);
* Warning: non-blocking protocols is work-in-progress; this flag may be
* silently ignored.
*/
+#if LIBAVFORMAT_VERSION_MAJOR < 53
#define AVIO_FLAG_NONBLOCK 4
+#else
+#define AVIO_FLAG_NONBLOCK 8
+#endif
/**
* Create and initialize a AVIOContext for accessing the
More information about the ffmpeg-cvslog
mailing list