diff options
author | Fabrice Bellard <fabrice@bellard.org> | 2002-05-18 23:11:09 +0000 |
---|---|---|
committer | Fabrice Bellard <fabrice@bellard.org> | 2002-05-18 23:11:09 +0000 |
commit | 1ea4f593658c8b161a0a725252058b49c16a6b29 (patch) | |
tree | 5bf96a2a7242b8a0c227a196a3368188a77f9d8e /libav/aviobuf.c | |
parent | 065422677a17ddb3d84a3b85b5064eb7df7e2c8a (diff) | |
download | ffmpeg-1ea4f593658c8b161a0a725252058b49c16a6b29.tar.gz |
use av memory handling functions
Originally committed as revision 528 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libav/aviobuf.c')
-rw-r--r-- | libav/aviobuf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libav/aviobuf.c b/libav/aviobuf.c index 888378df40..522891c902 100644 --- a/libav/aviobuf.c +++ b/libav/aviobuf.c @@ -337,14 +337,14 @@ int url_fdopen(ByteIOContext *s, URLContext *h) int buffer_size; buffer_size = (IO_BUFFER_SIZE / h->packet_size) * h->packet_size; - buffer = malloc(buffer_size); + buffer = av_malloc(buffer_size); if (!buffer) return -ENOMEM; if (init_put_byte(s, buffer, buffer_size, (h->flags & URL_WRONLY) != 0, h, url_read_packet, url_write_packet, url_seek_packet) < 0) { - free(buffer); + av_free(buffer); return -EIO; } s->is_streamed = h->is_streamed; @@ -356,11 +356,11 @@ int url_fdopen(ByteIOContext *s, URLContext *h) int url_setbufsize(ByteIOContext *s, int buf_size) { UINT8 *buffer; - buffer = malloc(buf_size); + buffer = av_malloc(buf_size); if (!buffer) return -ENOMEM; - free(s->buffer); + av_free(s->buffer); s->buffer = buffer; s->buffer_size = buf_size; s->buf_ptr = buffer; @@ -391,7 +391,7 @@ int url_fclose(ByteIOContext *s) { URLContext *h = s->opaque; - free(s->buffer); + av_free(s->buffer); memset(s, 0, sizeof(ByteIOContext)); return url_close(h); } |