Mercurial > libavformat.hg
changeset 93:69ed49c151bf libavformat
ffserver deallocate ctx->streams on closing patch by (Mark Hills <mark at pogo dot org dot uk>)
author | michaelni |
---|---|
date | Wed, 26 Mar 2003 10:30:08 +0000 |
parents | 5a4b5f03d13e |
children | 79b7d70d6c37 |
files | aviobuf.c |
diffstat | 1 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/aviobuf.c Wed Mar 26 09:28:52 2003 +0000 +++ b/aviobuf.c Wed Mar 26 10:30:08 2003 +0000 @@ -569,12 +569,9 @@ } if (new_allocated_size > d->allocated_size) { - new_buffer = av_malloc(new_allocated_size); - if (!new_buffer) - return; - memcpy(new_buffer, d->buffer, d->size); - av_free(d->buffer); - d->buffer = new_buffer; + d->buffer = av_realloc(d->buffer, new_allocated_size); + if(d->buffer == NULL) + return ; d->allocated_size = new_allocated_size; } memcpy(d->buffer + d->pos, buf, buf_size);