[FFmpeg-cvslog] r25579 - trunk/libavcodec/ffv1.c

michael subversion
Wed Oct 27 01:01:01 CEST 2010


Author: michael
Date: Wed Oct 27 01:01:00 2010
New Revision: 25579

Log:
Only allocate stats_out when needed in ffv1

Modified:
   trunk/libavcodec/ffv1.c

Modified: trunk/libavcodec/ffv1.c
==============================================================================
--- trunk/libavcodec/ffv1.c	Wed Oct 27 01:00:57 2010	(r25578)
+++ trunk/libavcodec/ffv1.c	Wed Oct 27 01:01:00 2010	(r25579)
@@ -945,6 +945,7 @@ static av_cold int encode_init(AVCodecCo
         return -1;
 
 #define STATS_OUT_SIZE 1024*30
+    if(avctx->flags & CODEC_FLAG_PASS1)
     avctx->stats_out= av_mallocz(STATS_OUT_SIZE);
 
     return 0;
@@ -1099,7 +1100,7 @@ static int encode_frame(AVCodecContext *
             p+= strlen(p);
         }
         snprintf(p, end-p, "\n");
-    } else
+    } else if(avctx->flags&CODEC_FLAG_PASS1)
         avctx->stats_out[0] = '\0';
 
     f->picture_number++;



More information about the ffmpeg-cvslog mailing list