Commit a10ab203 authored by michael's avatar michael

Make the ugly hack which uses an unused entry in the internal buffer

array actually use a unused one, so it does work.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14286 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 21c59acf
...@@ -195,7 +195,7 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){ ...@@ -195,7 +195,7 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){
return -1; return -1;
if(s->internal_buffer==NULL){ 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 #if 0
s->internal_buffer= av_fast_realloc( s->internal_buffer= av_fast_realloc(
...@@ -206,7 +206,7 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){ ...@@ -206,7 +206,7 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){
#endif #endif
buf= &((InternalBuffer*)s->internal_buffer)[s->internal_buffer_count]; 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)++; (*picture_number)++;
if(buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)){ if(buf->base[0] && (buf->width != w || buf->height != h || buf->pix_fmt != s->pix_fmt)){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment