Commit 4d6e6f94 authored by michael's avatar michael

Add a NULL pointer check to avcodec_close() this should prevent a segfault

when closing without open.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20495 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent edc76207
......@@ -675,7 +675,7 @@ int avcodec_close(AVCodecContext *avctx)
if (HAVE_THREADS && avctx->thread_opaque)
avcodec_thread_free(avctx);
if (avctx->codec->close)
if (avctx->codec && avctx->codec->close)
avctx->codec->close(avctx);
avcodec_default_free_buffers(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