* Copyright (c) 2000,2001 Fabrice Bellard
*
* This file is part of FFmpeg.
* Copyright (c) 2000,2001 Fabrice Bellard
*
* This file is part of FFmpeg.
// reserve 1 byte for terminating 0
buflen = FFMIN(buflen - 1, maxlen);
for (i = 0; i < buflen; i++)
if (!(buf[i] = avio_r8(s)))
return i + 1;
// reserve 1 byte for terminating 0
buflen = FFMIN(buflen - 1, maxlen);
for (i = 0; i < buflen; i++)
if (!(buf[i] = avio_r8(s)))
return i + 1;
alloc_size = FFMAX(s->buffer_size, new_size);
if (alloc_size > buf_size)
alloc_size = FFMAX(s->buffer_size, new_size);
if (alloc_size > buf_size)