[SCM] libav/experimental: add FF_API_URL_RESETBUF define to disable the deprecated url_resetbuf() public function

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:14:16 UTC 2013


The following commit has been merged in the experimental branch:
commit 364cacc7c7767f5ce147b4af5116fd5c427b0d5a
Author: Aurelien Jacobs <aurel at gnuage.org>
Date:   Thu Aug 19 21:28:43 2010 +0000

    add FF_API_URL_RESETBUF define to disable the deprecated url_resetbuf()
    public function
    
    Originally committed as revision 24841 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index d61e293..b95aaa4 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -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
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 8c5f94a..a33a7d9 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -454,7 +454,7 @@ int url_fdopen(ByteIOContext **s, URLContext *h);
 
 /** @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
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 2a96f5a..faae089 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -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 buf_size)
     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

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list