mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
reducing sizeof MpegEncContext to avoid stack overflow on crap M$ windo$
Originally committed as revision 914 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
df1b2c141b
commit
6b460aa387
@ -245,6 +245,9 @@ int MPV_common_init(MpegEncContext *s)
|
|||||||
CHECKED_ALLOCZ( s->pb2_buffer, PB_BUFFER_SIZE);
|
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);
|
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->edge_emu_buffer);
|
||||||
av_freep(&s->non_b_mv4_table);
|
av_freep(&s->non_b_mv4_table);
|
||||||
av_freep(&s->avctx->stats_out);
|
av_freep(&s->avctx->stats_out);
|
||||||
|
av_freep(&s->ac_stats);
|
||||||
|
|
||||||
for(i=0;i<3;i++) {
|
for(i=0;i<3;i++) {
|
||||||
int j;
|
int j;
|
||||||
|
@ -415,7 +415,7 @@ typedef struct MpegEncContext {
|
|||||||
UINT8 *intra_v_scantable;
|
UINT8 *intra_v_scantable;
|
||||||
UINT8 *intra_h_scantable;
|
UINT8 *intra_h_scantable;
|
||||||
/* [mb_intra][isChroma][level][run][last] */
|
/* [mb_intra][isChroma][level][run][last] */
|
||||||
int ac_stats[2][2][MAX_LEVEL+1][MAX_RUN+1][2];
|
int (*ac_stats)[2][MAX_LEVEL+1][MAX_RUN+1][2];
|
||||||
int inter_intra_pred;
|
int inter_intra_pred;
|
||||||
|
|
||||||
/* decompression specific */
|
/* decompression specific */
|
||||||
|
Loading…
Reference in New Issue
Block a user