Mercurial > libavcodec.hg
diff utils.c @ 10505:e7f082df2d65 libavcodec
Add a NULL pointer check to avcodec_close() this should prevent a segfault
when closing without open.
author | michael |
---|---|
date | Tue, 10 Nov 2009 02:51:47 +0000 |
parents | bdf4a9ca162a |
children | 046dcf7aa19c |
line wrap: on
line diff
--- a/utils.c Mon Nov 09 22:10:43 2009 +0000 +++ b/utils.c Tue Nov 10 02:51:47 2009 +0000 @@ -675,7 +675,7 @@ 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);