summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-02-03 13:19:21 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-02-03 13:19:21 +0000
commit5f37d3fbc60989d0315cc7fb7b7e790cd53dc6c3 (patch)
tree13dd2eff5bc040e34c6183231bb73bc2bd042dc7 /libmpcodecs
parent4aedf31dc5480a49106bd6ee76d5c2ce2f149bbb (diff)
downloadmpv-5f37d3fbc60989d0315cc7fb7b7e790cd53dc6c3.tar.bz2
mpv-5f37d3fbc60989d0315cc7fb7b7e790cd53dc6c3.tar.xz
Avoid crash in uninit if codec not found
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22109 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_ffmpeg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index 2b993c4a93..93ba5d660b 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -431,12 +431,14 @@ static void uninit(sh_video_t *sh){
);
}
+ 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);