avcodec/aac_adtstoasc_bsf: Fix memory leak

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Alex Sukhanov 2014-02-02 17:16:01 -08:00 committed by Michael Niedermayer
parent 8658390336
commit 889afca369
1 changed files with 1 additions and 0 deletions

View File

@ -87,6 +87,7 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
buf_size -= get_bits_count(&gb)/8;
buf += get_bits_count(&gb)/8;
}
av_free(avctx->extradata);
avctx->extradata_size = 2 + pce_size;
avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);