Mercurial > libavcodec.hg
diff mpegvideo.c @ 1552:26c6ecba99a1 libavcodec
dynamic alloc of picture structs instead of putting them in MpegEncContext
author | michael |
---|---|
date | Tue, 21 Oct 2003 19:55:31 +0000 |
parents | 5d06823e2ee9 |
children | 541681146f83 |
line wrap: on
line diff
--- a/mpegvideo.c Tue Oct 21 01:00:31 2003 +0000 +++ b/mpegvideo.c Tue Oct 21 19:55:31 2003 +0000 @@ -444,6 +444,8 @@ CHECKED_ALLOCZ(s->lambda_table, mb_array_size * sizeof(int)) } + CHECKED_ALLOCZ(s->picture, MAX_PICTURE_COUNT * sizeof(Picture)) + CHECKED_ALLOCZ(s->error_status_table, mb_array_size*sizeof(uint8_t)) if (s->out_format == FMT_H263 || s->encoding) { @@ -562,6 +564,7 @@ for(i=0; i<MAX_PICTURE_COUNT; i++){ free_picture(s, &s->picture[i]); } + av_freep(&s->picture); avcodec_default_free_buffers(s->avctx); s->context_initialized = 0; s->last_picture_ptr=