int avio_get_str16be(AVIOContext *pb, int maxlen, char *buf, int buflen);
-#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(AVIOContext *s, int flags);
-#endif
-
/**
* @defgroup open_modes URL open modes
* The flags argument to avio_open must be one of the following
#define SHORT_SEEK_THRESHOLD 4096
static void fill_buffer(AVIOContext *s);
-#if !FF_API_URL_RESETBUF
static int url_resetbuf(AVIOContext *s, int flags);
-#endif
int ffio_init_context(AVIOContext *s,
unsigned char *buffer,
return 0;
}
-#if FF_API_URL_RESETBUF
-int url_resetbuf(AVIOContext *s, int flags)
-#else
static int url_resetbuf(AVIOContext *s, int flags)
-#endif
{
-#if FF_API_URL_RESETBUF
- if (flags & AVIO_RDWR)
- return AVERROR(EINVAL);
-#else
assert(flags == AVIO_WRONLY || flags == AVIO_RDONLY);
-#endif
if (flags & AVIO_WRONLY) {
s->buf_end = s->buffer + s->buffer_size;
#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