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

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


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

Log:
Factorize litteral constents in ffv1 into STATS_OUT_SIZE.

Modified:
   trunk/libavcodec/ffv1.c

Modified: trunk/libavcodec/ffv1.c
==============================================================================
--- trunk/libavcodec/ffv1.c	Wed Oct 27 01:00:49 2010	(r25577)
+++ trunk/libavcodec/ffv1.c	Wed Oct 27 01:00:57 2010	(r25578)
@@ -944,7 +944,8 @@ static av_cold int encode_init(AVCodecCo
     if(init_slice_state(s) < 0)
         return -1;
 
-    avctx->stats_out= av_mallocz(1024*30);
+#define STATS_OUT_SIZE 1024*30
+    avctx->stats_out= av_mallocz(STATS_OUT_SIZE);
 
     return 0;
 }
@@ -1082,7 +1083,7 @@ static int encode_frame(AVCodecContext *
     if((avctx->flags&CODEC_FLAG_PASS1) && (f->picture_number&31)==0){
         int j;
         char *p= avctx->stats_out;
-        char *end= p + 1024*30;
+        char *end= p + STATS_OUT_SIZE;
 
         memset(f->rc_stat, 0, sizeof(f->rc_stat));
         for(j=0; j<f->slice_count; j++){



More information about the ffmpeg-cvslog mailing list