[FFmpeg-devel] [PATCH] avio: rename url_setbufsize -> avio_set_buf_size
Anton Khirnov
anton
Sun Mar 6 20:04:29 CET 2011
---
libavformat/avio.h | 3 ++-
libavformat/aviobuf.c | 8 ++++++--
libavformat/utils.c | 2 +-
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 3130102..f690e10 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -426,6 +426,7 @@ attribute_deprecated int64_t url_ftell(AVIOContext *s);
attribute_deprecated int64_t url_fsize(AVIOContext *s);
attribute_deprecated int url_feof(AVIOContext *s);
attribute_deprecated int url_ferror(AVIOContext *s);
+attribute_deprecated int url_setbufsize(AVIOContext *s, int buf_size);
/**
* @}
*/
@@ -592,7 +593,7 @@ static inline int url_is_streamed(AVIOContext *s)
int url_fdopen(AVIOContext **s, URLContext *h);
/** @warning must be called before any I/O */
-int url_setbufsize(AVIOContext *s, int buf_size);
+int avio_set_buf_size(AVIOContext *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.
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 16c3179..b118683 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -377,6 +377,10 @@ int64_t url_fsize(AVIOContext *s)
{
return avio_size(s);
}
+int url_setbufsize(AVIOContext *s, int buf_size)
+{
+ return avio_set_buf_size(s, buf_size);
+}
#endif
int avio_put_str(AVIOContext *s, const char *str)
@@ -490,7 +494,7 @@ static void fill_buffer(AVIOContext *s)
/* make buffer smaller in case it ended up large after probing */
if (s->buffer_size > max_buffer_size) {
- url_setbufsize(s, max_buffer_size);
+ avio_set_buf_size(s, max_buffer_size);
s->checksum_ptr = dst = s->buffer;
len = s->buffer_size;
@@ -799,7 +803,7 @@ int url_fdopen(AVIOContext **s, URLContext *h)
return 0;
}
-int url_setbufsize(AVIOContext *s, int buf_size)
+int avio_set_buf_size(AVIOContext *s, int buf_size)
{
uint8_t *buffer;
buffer = av_malloc(buf_size);
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 5b53699..1268be3 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -620,7 +620,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
goto fail;
}
if (buf_size > 0) {
- url_setbufsize(pb, buf_size);
+ avio_set_buf_size(pb, buf_size);
}
if (!fmt && (err = av_probe_input_buffer(pb, &fmt, filename, logctx, 0, logctx ? (*ic_ptr)->probesize : 0)) < 0) {
goto fail;
--
1.7.4.1
More information about the ffmpeg-devel
mailing list