Mercurial > mplayer.hg
diff libmpcodecs/vd_ffmpeg.c @ 22091:035fd43fe5f1
Avoid crash in uninit if codec not found
author | reimar |
---|---|
date | Sat, 03 Feb 2007 13:19:21 +0000 |
parents | e81065a87c2d |
children | acac2d8bc25f |
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);