diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2015-04-21 18:17:38 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-04-22 12:27:13 +0200 |
commit | a78f5548d94f23ce23cece41edf0fe9d18926de6 (patch) | |
tree | 20c3834d9df934c11060f23a81f10adbd5285efd | |
parent | aef0be08756e00f363c524453c948a6e2a348614 (diff) | |
download | ffmpeg-a78f5548d94f23ce23cece41edf0fe9d18926de6.tar.gz |
avcodec: Free the default avoptions on init failure
-rw-r--r-- | libavcodec/utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 7740147bb6..c9ae19b8d8 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1292,6 +1292,10 @@ free_and_end: (avctx->codec->caps_internal & FF_CODEC_CAP_INIT_CLEANUP)) avctx->codec->close(avctx); + if (avctx->priv_data && avctx->codec && avctx->codec->priv_class) + av_opt_free(avctx->priv_data); + av_opt_free(avctx); + av_dict_free(&tmp); av_freep(&avctx->priv_data); if (avctx->internal) { |