Mercurial > libavcodec.hg
changeset 11585:aea1b01ff81b libavcodec
Fix segfault when encoder initialization fails.
Patch by Craig Thomasson $(name) dot $(surname) ripcode com
author | benoit |
---|---|
date | Tue, 06 Apr 2010 09:52:41 +0000 |
parents | 3309ebc37b11 |
children | 2dc5036a8d18 |
files | utils.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.c Sun Apr 04 07:18:10 2010 +0000 +++ b/utils.c Tue Apr 06 09:52:41 2010 +0000 @@ -710,7 +710,7 @@ avctx->codec->close(avctx); avcodec_default_free_buffers(avctx); av_freep(&avctx->priv_data); - if(avctx->codec->encode) + if(avctx->codec && avctx->codec->encode) av_freep(&avctx->extradata); avctx->codec = NULL; entangled_thread_counter--;