[FFmpeg-devel] [PATCH 04/16] lavf: remove FF_API_URL_RESETBUF cruft

Anton Khirnov anton
Thu Feb 3 16:36:31 CET 2011


---
 libavformat/avio.h    |    7 -------
 libavformat/aviobuf.c |   11 -----------
 libavformat/version.h |    3 ---
 3 files changed, 0 insertions(+), 21 deletions(-)

diff --git a/libavformat/avio.h b/libavformat/avio.h
index a606f7c..0e4fd2b 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -497,13 +497,6 @@ int url_fdopen(ByteIOContext **s, URLContext *h);
 
 /** @warning must be called before any I/O */
 int url_setbufsize(ByteIOContext *s, int buf_size);
-#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
- *        to set up the buffer for writing. */
-int url_resetbuf(ByteIOContext *s, int flags);
-#endif
 
 /**
  * Rewind the ByteIOContext using the specified buffer containing the first buf_size bytes of the file.
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index acea811..2d515f0 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -36,9 +36,7 @@
 #define SHORT_SEEK_THRESHOLD 4096
 
 static void fill_buffer(ByteIOContext *s);
-#if !FF_API_URL_RESETBUF
 static int url_resetbuf(ByteIOContext *s, int flags);
-#endif
 
 int init_put_byte(ByteIOContext *s,
                   unsigned char *buffer,
@@ -695,18 +693,9 @@ int url_setbufsize(ByteIOContext *s, int buf_size)
     return 0;
 }
 
-#if FF_API_URL_RESETBUF
-int url_resetbuf(ByteIOContext *s, int flags)
-#else
 static int url_resetbuf(ByteIOContext *s, int flags)
-#endif
 {
-#if FF_API_URL_RESETBUF
-    if (flags & URL_RDWR)
-        return AVERROR(EINVAL);
-#else
     assert(flags == URL_WRONLY || flags == URL_RDONLY);
-#endif
 
     if (flags & URL_WRONLY) {
         s->buf_end = s->buffer + s->buffer_size;
diff --git a/libavformat/version.h b/libavformat/version.h
index 73cae55..a12edce 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -44,9 +44,6 @@
 #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
-- 
1.7.2.3




More information about the ffmpeg-devel mailing list