[FFmpeg-cvslog] r23998 - trunk/libavcodec/mpegvideo.c
mru
subversion
Fri Jul 2 17:00:21 CEST 2010
Author: mru
Date: Fri Jul 2 17:00:21 2010
New Revision: 23998
Log:
Fix memory leak introduced in r23933
Modified:
trunk/libavcodec/mpegvideo.c
Modified: trunk/libavcodec/mpegvideo.c
==============================================================================
--- trunk/libavcodec/mpegvideo.c Fri Jul 2 16:23:17 2010 (r23997)
+++ trunk/libavcodec/mpegvideo.c Fri Jul 2 17:00:21 2010 (r23998)
@@ -385,7 +385,8 @@ static int init_duplicate_context(MpegEn
s->pblocks[i] = &s->block[i];
}
- if (s->ac_val_base) {
+ if (s->out_format == FMT_H263) {
+ /* ac values */
FF_ALLOCZ_OR_GOTO(s->avctx, s->ac_val_base, yc_size * sizeof(int16_t) * 16, fail);
s->ac_val[0] = s->ac_val_base + s->b8_stride + 1;
s->ac_val[1] = s->ac_val_base + y_size + s->mb_stride + 1;
@@ -621,12 +622,6 @@ av_cold int MPV_common_init(MpegEncConte
}
}
if (s->out_format == FMT_H263) {
- /* ac values */
- FF_ALLOCZ_OR_GOTO(s->avctx, s->ac_val_base, yc_size * sizeof(int16_t) * 16, fail);
- s->ac_val[0] = s->ac_val_base + s->b8_stride + 1;
- s->ac_val[1] = s->ac_val_base + y_size + s->mb_stride + 1;
- s->ac_val[2] = s->ac_val[1] + c_size;
-
/* cbp values */
FF_ALLOCZ_OR_GOTO(s->avctx, s->coded_block_base, y_size, fail);
s->coded_block= s->coded_block_base + s->b8_stride + 1;
@@ -728,7 +723,6 @@ void MPV_common_end(MpegEncContext *s)
}
av_freep(&s->dc_val_base);
- av_freep(&s->ac_val_base);
av_freep(&s->coded_block_base);
av_freep(&s->mbintra_table);
av_freep(&s->cbp_table);
More information about the ffmpeg-cvslog
mailing list