mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/asvenc: remove code allocating dummy coded_frame
Fixes memleak Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
918cab1a9f
commit
f0f04fd842
@ -237,12 +237,6 @@ static av_cold int encode_init(AVCodecContext *avctx){
|
|||||||
int i;
|
int i;
|
||||||
const int scale= avctx->codec_id == AV_CODEC_ID_ASV1 ? 1 : 2;
|
const int scale= avctx->codec_id == AV_CODEC_ID_ASV1 ? 1 : 2;
|
||||||
|
|
||||||
avctx->coded_frame = av_frame_alloc();
|
|
||||||
if (!avctx->coded_frame)
|
|
||||||
return AVERROR(ENOMEM);
|
|
||||||
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
|
|
||||||
avctx->coded_frame->key_frame = 1;
|
|
||||||
|
|
||||||
ff_asv_common_init(avctx);
|
ff_asv_common_init(avctx);
|
||||||
|
|
||||||
if(avctx->global_quality == 0) avctx->global_quality= 4*FF_QUALITY_SCALE;
|
if(avctx->global_quality == 0) avctx->global_quality= 4*FF_QUALITY_SCALE;
|
||||||
|
Loading…
Reference in New Issue
Block a user