Message ID | 20200926102804.228089-22-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | b8e0ceda11f7a12d763c6a744943347fc808b8b7 |
Headers | show |
Series | [FFmpeg-devel,01/25] avcodec/photocd: Simplify parsing Huffman tables a bit | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 05064b560f..a976ceb260 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1034,11 +1034,15 @@ free_and_end: av_opt_free(avctx->priv_data); av_opt_free(avctx); + if (av_codec_is_encoder(avctx->codec)) { #if FF_API_CODED_FRAME FF_DISABLE_DEPRECATION_WARNINGS av_frame_free(&avctx->coded_frame); FF_ENABLE_DEPRECATION_WARNINGS #endif + av_freep(&avctx->extradata); + avctx->extradata_size = 0; + } av_dict_free(&tmp); av_freep(&avctx->priv_data);
It is owned by libavcodec for encoders. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavcodec/utils.c | 4 ++++ 1 file changed, 4 insertions(+)