Commit 364cacc7 authored by Aurelien Jacobs's avatar Aurelien Jacobs

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
parent 838b27b4
...@@ -48,6 +48,9 @@ ...@@ -48,6 +48,9 @@
#ifndef FF_API_URL_CLASS #ifndef FF_API_URL_CLASS
#define FF_API_URL_CLASS (LIBAVFORMAT_VERSION_MAJOR >= 53) #define FF_API_URL_CLASS (LIBAVFORMAT_VERSION_MAJOR >= 53)
#endif #endif
#ifndef FF_API_URL_RESETBUF
#define FF_API_URL_RESETBUF (LIBAVFORMAT_VERSION_MAJOR < 53)
#endif
#ifndef FF_API_REGISTER_PROTOCOL #ifndef FF_API_REGISTER_PROTOCOL
#define FF_API_REGISTER_PROTOCOL (LIBAVFORMAT_VERSION_MAJOR < 53) #define FF_API_REGISTER_PROTOCOL (LIBAVFORMAT_VERSION_MAJOR < 53)
#endif #endif
......
...@@ -454,7 +454,7 @@ int url_fdopen(ByteIOContext **s, URLContext *h); ...@@ -454,7 +454,7 @@ int url_fdopen(ByteIOContext **s, URLContext *h);
/** @warning must be called before any I/O */ /** @warning must be called before any I/O */
int url_setbufsize(ByteIOContext *s, int buf_size); 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. /** Reset the buffer for reading or writing.
* @note Will drop any data currently in the buffer without transmitting it. * @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 * @param flags URL_RDONLY to set up the buffer for reading, or URL_WRONLY
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#define SHORT_SEEK_THRESHOLD 4096 #define SHORT_SEEK_THRESHOLD 4096
static void fill_buffer(ByteIOContext *s); static void fill_buffer(ByteIOContext *s);
#if LIBAVFORMAT_VERSION_MAJOR >= 53 #if !FF_API_URL_RESETBUF
static int url_resetbuf(ByteIOContext *s, int flags); static int url_resetbuf(ByteIOContext *s, int flags);
#endif #endif
...@@ -632,13 +632,13 @@ int url_setbufsize(ByteIOContext *s, int buf_size) ...@@ -632,13 +632,13 @@ int url_setbufsize(ByteIOContext *s, int buf_size)
return 0; return 0;
} }
#if LIBAVFORMAT_VERSION_MAJOR < 53 #if FF_API_URL_RESETBUF
int url_resetbuf(ByteIOContext *s, int flags) int url_resetbuf(ByteIOContext *s, int flags)
#else #else
static int url_resetbuf(ByteIOContext *s, int flags) static int url_resetbuf(ByteIOContext *s, int flags)
#endif #endif
{ {
#if LIBAVFORMAT_VERSION_MAJOR < 53 #if FF_API_URL_RESETBUF
if (flags & URL_RDWR) if (flags & URL_RDWR)
return AVERROR(EINVAL); return AVERROR(EINVAL);
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment