diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-01-16 15:32:33 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-01-16 15:32:33 +0000 |
commit | dc2c2eea41200d317952b856b1f7c79e9da24475 (patch) | |
tree | cc1cf54b913aedcbe9c953de12a4a379e9787f5c /libavformat/aviobuf.c | |
parent | 7ce820efa09a3281e55e1ff694b14c2291ec6087 (diff) | |
download | ffmpeg-dc2c2eea41200d317952b856b1f7c79e9da24475.tar.gz |
Use av_mallocz instead of explicitly zeroing in url_open_dyn_buf_internal.
Originally committed as revision 16634 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r-- | libavformat/aviobuf.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 15328d3fbe..34a55d5f58 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -794,7 +794,7 @@ static int url_open_dyn_buf_internal(ByteIOContext **s, int max_packet_size) 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 @@ static int url_open_dyn_buf_internal(ByteIOContext **s, int max_packet_size) 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, |