[FFmpeg-cvslog] r24841 - in trunk/libavformat: avformat.h avio.h aviobuf.c

aurel subversion
Thu Aug 19 23:28:43 CEST 2010


Author: aurel
Date: Thu Aug 19 23:28:43 2010
New Revision: 24841

Log:
add FF_API_URL_RESETBUF define to disable the deprecated url_resetbuf()
public function

Modified:
   trunk/libavformat/avformat.h
   trunk/libavformat/avio.h
   trunk/libavformat/aviobuf.c

Modified: trunk/libavformat/avformat.h
==============================================================================
--- trunk/libavformat/avformat.h	Thu Aug 19 23:21:32 2010	(r24840)
+++ trunk/libavformat/avformat.h	Thu Aug 19 23:28:43 2010	(r24841)
@@ -48,6 +48,9 @@
 #ifndef FF_API_URL_CLASS
 #define FF_API_URL_CLASS     (LIBAVFORMAT_VERSION_MAJOR >= 53)
 #endif
+#ifndef FF_API_URL_RESETBUF
+#define FF_API_URL_RESETBUF       (LIBAVFORMAT_VERSION_MAJOR < 53)
+#endif
 #ifndef FF_API_REGISTER_PROTOCOL
 #define FF_API_REGISTER_PROTOCOL  (LIBAVFORMAT_VERSION_MAJOR < 53)
 #endif

Modified: trunk/libavformat/avio.h
==============================================================================
--- trunk/libavformat/avio.h	Thu Aug 19 23:21:32 2010	(r24840)
+++ trunk/libavformat/avio.h	Thu Aug 19 23:28:43 2010	(r24841)
@@ -454,7 +454,7 @@ int url_fdopen(ByteIOContext **s, URLCon
 
 /** @warning must be called before any I/O */
 int url_setbufsize(ByteIOContext *s, int buf_size);
-#if LIBAVFORMAT_VERSION_MAJOR < 53
+#if FF_API_URL_RESETBUF
 /** Reset the buffer for reading or writing.
  * @note Will drop any data currently in the buffer without transmitting it.
  * @param flags URL_RDONLY to set up the buffer for reading, or URL_WRONLY

Modified: trunk/libavformat/aviobuf.c
==============================================================================
--- trunk/libavformat/aviobuf.c	Thu Aug 19 23:21:32 2010	(r24840)
+++ trunk/libavformat/aviobuf.c	Thu Aug 19 23:28:43 2010	(r24841)
@@ -36,7 +36,7 @@
 #define SHORT_SEEK_THRESHOLD 4096
 
 static void fill_buffer(ByteIOContext *s);
-#if LIBAVFORMAT_VERSION_MAJOR >= 53
+#if !FF_API_URL_RESETBUF
 static int url_resetbuf(ByteIOContext *s, int flags);
 #endif
 
@@ -632,13 +632,13 @@ int url_setbufsize(ByteIOContext *s, int
     return 0;
 }
 
-#if LIBAVFORMAT_VERSION_MAJOR < 53
+#if FF_API_URL_RESETBUF
 int url_resetbuf(ByteIOContext *s, int flags)
 #else
 static int url_resetbuf(ByteIOContext *s, int flags)
 #endif
 {
-#if LIBAVFORMAT_VERSION_MAJOR < 53
+#if FF_API_URL_RESETBUF
     if (flags & URL_RDWR)
         return AVERROR(EINVAL);
 #else



More information about the ffmpeg-cvslog mailing list