Commit ceff045d authored by Ronald S. Bultje's avatar Ronald S. Bultje
Browse files

utils.c: fix crash with threading enabled.

parent 8477f2de
......@@ -783,7 +783,7 @@ av_cold int avcodec_close(AVCodecContext *avctx)
avctx->codec->close(avctx);
avcodec_default_free_buffers(avctx);
avctx->coded_frame = NULL;
if (avctx->codec->priv_class)
if (avctx->codec && avctx->codec->priv_class)
av_opt_free(avctx->priv_data);
av_opt_free(avctx);
av_freep(&avctx->priv_data);
......
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