Browse code

Factorize litteral constents in ffv1 into STATS_OUT_SIZE.

Originally committed as revision 25578 to svn://svn.ffmpeg.org/ffmpeg/trunk

Michael Niedermayer authored on 2010/10/27 08:00:57
Showing 1 changed files
... ...
@@ -944,7 +944,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
944 944
     if(init_slice_state(s) < 0)
945 945
         return -1;
946 946
 
947
-    avctx->stats_out= av_mallocz(1024*30);
947
+#define STATS_OUT_SIZE 1024*30
948
+    avctx->stats_out= av_mallocz(STATS_OUT_SIZE);
948 949
 
949 950
     return 0;
950 951
 }
... ...
@@ -1082,7 +1083,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
1082 1082
     if((avctx->flags&CODEC_FLAG_PASS1) && (f->picture_number&31)==0){
1083 1083
         int j;
1084 1084
         char *p= avctx->stats_out;
1085
-        char *end= p + 1024*30;
1085
+        char *end= p + STATS_OUT_SIZE;
1086 1086
 
1087 1087
         memset(f->rc_stat, 0, sizeof(f->rc_stat));
1088 1088
         for(j=0; j<f->slice_count; j++){