Mercurial > mplayer.hg
changeset 22091:035fd43fe5f1
Avoid crash in uninit if codec not found
author | reimar |
---|---|
date | Sat, 03 Feb 2007 13:19:21 +0000 |
parents | 5d2eb1fb3579 |
children | acac2d8bc25f |
files | libmpcodecs/vd_ffmpeg.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c Sat Feb 03 12:57:58 2007 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Sat Feb 03 13:19:21 2007 +0000 @@ -431,12 +431,14 @@ ); } + if (avctx) { if (avctx && avctx->codec && avcodec_close(avctx) < 0) mp_msg(MSGT_DECVIDEO,MSGL_ERR, MSGTR_CantCloseCodec); av_freep(&avctx->extradata); av_freep(&avctx->palctrl); av_freep(&avctx->slice_offset); + } av_freep(&avctx); av_freep(&ctx->pic);