diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-05 01:58:57 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-25 23:01:54 +0200 |
commit | 530ac6aa305aeda631c77f8a17e96c14c7ab1a1c (patch) | |
tree | fcdbe2b070c6f86181e496cfbf2d6ce74e558919 /libavformat | |
parent | 19093100fd5c3100f15a5c41f99e1f5792997b73 (diff) | |
download | ffmpeg-530ac6aa305aeda631c77f8a17e96c14c7ab1a1c.tar.gz |
avformat/aviobuf: Make ffio_set_buf_size() static
Possible since 9c3adb7ce23522dcceb264bc0bffd3592dd3e1a5.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/avio_internal.h | 3 | ||||
-rw-r--r-- | libavformat/aviobuf.c | 8 |
2 files changed, 5 insertions, 6 deletions
diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h index 2c6d00b5ff..de95b43bdb 100644 --- a/libavformat/avio_internal.h +++ b/libavformat/avio_internal.h @@ -83,9 +83,6 @@ uint64_t ffio_read_varlen(AVIOContext *bc); */ int ffio_read_size(AVIOContext *s, unsigned char *buf, int size); -/** @warning must be called before any I/O */ -int ffio_set_buf_size(AVIOContext *s, int buf_size); - /** * Reallocate a given buffer for AVIOContext. * diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 9322ed38bc..1f0819b328 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -74,6 +74,8 @@ const AVClass ff_avio_class = { static void fill_buffer(AVIOContext *s); static int url_resetbuf(AVIOContext *s, int flags); +/** @warning must be called before any I/O */ +static int set_buf_size(AVIOContext *s, int buf_size); int ffio_init_context(AVIOContext *s, unsigned char *buffer, @@ -543,7 +545,7 @@ static void fill_buffer(AVIOContext *s) /* make buffer smaller in case it ended up large after probing */ if (s->read_packet && s->orig_buffer_size && s->buffer_size > s->orig_buffer_size && len >= s->orig_buffer_size) { if (dst == s->buffer && s->buf_ptr != dst) { - int ret = ffio_set_buf_size(s, s->orig_buffer_size); + int ret = set_buf_size(s, s->orig_buffer_size); if (ret < 0) av_log(s, AV_LOG_WARNING, "Failed to decrease buffer size\n"); @@ -1040,7 +1042,7 @@ int ffio_limit(AVIOContext *s, int size) return size; } -int ffio_set_buf_size(AVIOContext *s, int buf_size) +static int set_buf_size(AVIOContext *s, int buf_size) { uint8_t *buffer; buffer = av_malloc(buf_size); @@ -1062,7 +1064,7 @@ int ffio_realloc_buf(AVIOContext *s, int buf_size) int data_size; if (!s->buffer_size) - return ffio_set_buf_size(s, buf_size); + return set_buf_size(s, buf_size); if (buf_size <= s->buffer_size) return 0; |