aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-10-21 19:55:31 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-10-21 19:55:31 +0000
commitb465449eb7acaa06034bca4cc494440f7ea93ef6 (patch)
tree37522a63a9905c84b5f7167fd1c9751ae43bdff5 /libavcodec/mpegvideo.c
parent7f96ed5b16cd340dc5b0878f7d070636c4ed7ef2 (diff)
downloadffmpeg-b465449eb7acaa06034bca4cc494440f7ea93ef6.tar.gz
dynamic alloc of picture structs instead of putting them in MpegEncContext
Originally committed as revision 2410 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 2f60055721..a4d29ba900 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -444,6 +444,8 @@ int MPV_common_init(MpegEncContext *s)
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 @@ void MPV_common_end(MpegEncContext *s)
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=