diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-09-11 07:26:43 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-09-11 07:26:43 +0000 |
commit | 6b460aa387530feefc91302c150a3405997e61cf (patch) | |
tree | cb420c1dcd5153a3a1d1c704ebac6b241593531b /libavcodec/mpegvideo.c | |
parent | df1b2c141b7f36102f651598f8d1abf27f28b0a0 (diff) | |
download | ffmpeg-6b460aa387530feefc91302c150a3405997e61cf.tar.gz |
reducing sizeof MpegEncContext to avoid stack overflow on crap M$ windo$
Originally committed as revision 914 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 7a15b761e4..70eb782a00 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -245,6 +245,9 @@ int MPV_common_init(MpegEncContext *s) CHECKED_ALLOCZ( s->pb2_buffer, PB_BUFFER_SIZE); } + if(s->msmpeg4_version){ + CHECKED_ALLOCZ(s->ac_stats, 2*2*(MAX_LEVEL+1)*(MAX_RUN+1)*2*sizeof(int)); + } CHECKED_ALLOCZ(s->avctx->stats_out, 256); } @@ -349,6 +352,7 @@ void MPV_common_end(MpegEncContext *s) av_freep(&s->edge_emu_buffer); av_freep(&s->non_b_mv4_table); av_freep(&s->avctx->stats_out); + av_freep(&s->ac_stats); for(i=0;i<3;i++) { int j; |