Browse Source

Factorize litteral constents in ffv1 into STATS_OUT_SIZE.

Originally committed as revision 25578 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/n0.8
Michael Niedermayer 14 years ago
parent
commit
2a317c6be4
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      libavcodec/ffv1.c

+ 3
- 2
libavcodec/ffv1.c View File

@@ -944,7 +944,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
if(init_slice_state(s) < 0) if(init_slice_state(s) < 0)
return -1; 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; return 0;
} }
@@ -1082,7 +1083,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
if((avctx->flags&CODEC_FLAG_PASS1) && (f->picture_number&31)==0){ if((avctx->flags&CODEC_FLAG_PASS1) && (f->picture_number&31)==0){
int j; int j;
char *p= avctx->stats_out; 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)); memset(f->rc_stat, 0, sizeof(f->rc_stat));
for(j=0; j<f->slice_count; j++){ for(j=0; j<f->slice_count; j++){


Loading…
Cancel
Save