Mercurial > libavcodec.hg
changeset 7307:52764a3665d8 libavcodec
Make the ugly hack which uses an unused entry in the internal buffer
array actually use a unused one, so it does work.
author | michael |
---|---|
date | Sat, 19 Jul 2008 00:32:15 +0000 |
parents | 7950572e58eb |
children | 29319d07aeb4 |
files | utils.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.c Fri Jul 18 21:16:59 2008 +0000 +++ b/utils.c Sat Jul 19 00:32:15 2008 +0000 @@ -195,7 +195,7 @@ return -1; if(s->internal_buffer==NULL){ - s->internal_buffer= av_mallocz(INTERNAL_BUFFER_SIZE*sizeof(InternalBuffer)); + s->internal_buffer= av_mallocz((INTERNAL_BUFFER_SIZE+1)*sizeof(InternalBuffer)); } #if 0 s->internal_buffer= av_fast_realloc( @@ -206,7 +206,7 @@ #endif buf= &((InternalBuffer*)s->internal_buffer)[s->internal_buffer_count]; - picture_number= &(((InternalBuffer*)s->internal_buffer)[INTERNAL_BUFFER_SIZE-1]).last_pic_num; //FIXME ugly hack + picture_number= &(((InternalBuffer*)s->internal_buffer)[INTERNAL_BUFFER_SIZE]).last_pic_num; //FIXME ugly hack (*picture_number)++; if(buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)){