[MPlayer-cvslog] r22109 - trunk/libmpcodecs/vd_ffmpeg.c

reimar subversion at mplayerhq.hu
Sat Feb 3 14:19:21 CET 2007


Author: reimar
Date: Sat Feb  3 14:19:21 2007
New Revision: 22109

Modified:
   trunk/libmpcodecs/vd_ffmpeg.c

Log:
Avoid crash in uninit if codec not found


Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	(original)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Sat Feb  3 14:19:21 2007
@@ -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);



More information about the MPlayer-cvslog mailing list