[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec utils.c,1.174,1.175

Michael Niedermayer CVS michael
Fri Mar 3 21:36:11 CET 2006


Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv27079

Modified Files:
	utils.c 
Log Message:
fix segfault with BLUR8.AVI


Index: utils.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/utils.c,v
retrieving revision 1.174
retrieving revision 1.175
diff -u -d -r1.174 -r1.175
--- utils.c	21 Feb 2006 22:05:13 -0000	1.174
+++ utils.c	3 Mar 2006 20:36:08 -0000	1.175
@@ -844,9 +844,6 @@
     if(avctx->codec)
         goto end;
 
-    avctx->codec = codec;
-    avctx->codec_id = codec->id;
-    avctx->frame_number = 0;
     if (codec->priv_data_size > 0) {
         avctx->priv_data = av_mallocz(codec->priv_data_size);
         if (!avctx->priv_data)
@@ -865,9 +862,13 @@
         goto end;
     }
 
+    avctx->codec = codec;
+    avctx->codec_id = codec->id;
+    avctx->frame_number = 0;
     ret = avctx->codec->init(avctx);
     if (ret < 0) {
         av_freep(&avctx->priv_data);
+        avctx->codec= NULL;
         goto end;
     }
     ret=0;





More information about the ffmpeg-cvslog mailing list