Mercurial > libavcodec.hg
changeset 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 | 9f16f997c41b |
children | a1d84a5cf21d |
files | utils.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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);