comparison vc1dec.c @ 11270:f64dd8297105 libavcodec

ff_msmpeg4_decode_init() calls ff_h263_decode_init() which calls MPV_common_init(), so calling both is redundant and leads to memory leaks in WMV3/VC-1 decoder. Thus use only the first function in WMV3/VC-1 decoder initialization.
author kostya
date Wed, 24 Feb 2010 13:11:38 +0000
parents 9f25ae41c807
children 8a4984c5cacc
comparison
equal deleted inserted replaced
11269:fc001a3aa390 11270:f64dd8297105
2992 2992
2993 if(avctx->idct_algo==FF_IDCT_AUTO){ 2993 if(avctx->idct_algo==FF_IDCT_AUTO){
2994 avctx->idct_algo=FF_IDCT_WMV2; 2994 avctx->idct_algo=FF_IDCT_WMV2;
2995 } 2995 }
2996 2996
2997 if(ff_h263_decode_init(avctx) < 0) 2997 if(ff_msmpeg4_decode_init(avctx) < 0)
2998 return -1; 2998 return -1;
2999 if (vc1_init_common(v) < 0) return -1; 2999 if (vc1_init_common(v) < 0) return -1;
3000 // only for ff_msmp4_mb_i_table
3001 if (ff_msmpeg4_decode_init(avctx) < 0) return -1;
3002 3000
3003 avctx->coded_width = avctx->width; 3001 avctx->coded_width = avctx->width;
3004 avctx->coded_height = avctx->height; 3002 avctx->coded_height = avctx->height;
3005 if (avctx->codec_id == CODEC_ID_WMV3) 3003 if (avctx->codec_id == CODEC_ID_WMV3)
3006 { 3004 {