Mercurial > libavformat.hg
changeset 4232:5defcf4194fb libavformat
Use av_mallocz instead of explicitly zeroing in url_open_dyn_buf_internal.
author | reimar |
---|---|
date | Fri, 16 Jan 2009 15:32:33 +0000 |
parents | 07ea426be9a3 |
children | 4b550415c874 |
files | aviobuf.c |
diffstat | 1 files changed, 1 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/aviobuf.c Fri Jan 16 15:30:52 2009 +0000 +++ b/aviobuf.c Fri Jan 16 15:32:33 2009 +0000 @@ -794,7 +794,7 @@ if(sizeof(DynBuffer) + io_buffer_size < io_buffer_size) return -1; - d = av_malloc(sizeof(DynBuffer) + io_buffer_size); + d = av_mallocz(sizeof(DynBuffer) + io_buffer_size); if (!d) return -1; *s = av_mallocz(sizeof(ByteIOContext)); @@ -803,10 +803,6 @@ return AVERROR(ENOMEM); } d->io_buffer_size = io_buffer_size; - d->buffer = NULL; - d->pos = 0; - d->size = 0; - d->allocated_size = 0; ret = init_put_byte(*s, d->io_buffer, io_buffer_size, 1, d, NULL, max_packet_size ? dyn_packet_buf_write : dyn_buf_write,