Commit a78f5548 authored by Luca Barbato's avatar Luca Barbato

avcodec: Free the default avoptions on init failure

parent aef0be08
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment