diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-10-26 23:01:00 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-10-26 23:01:00 +0000 |
commit | c42c1007c7b65c0b188467e2d349e3af543eb4c2 (patch) | |
tree | a772e5d4c7523805378fdec2bbe08839dcf87291 /libavcodec/ffv1.c | |
parent | 2a317c6be4d73a679e66c3e8633a289dd890cf5e (diff) | |
download | ffmpeg-c42c1007c7b65c0b188467e2d349e3af543eb4c2.tar.gz |
Only allocate stats_out when needed in ffv1
Originally committed as revision 25579 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ffv1.c')
-rw-r--r-- | libavcodec/ffv1.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c index e9d6796ded..4e2dceb026 100644 --- a/libavcodec/ffv1.c +++ b/libavcodec/ffv1.c @@ -945,6 +945,7 @@ static av_cold int encode_init(AVCodecContext *avctx) 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 *avctx, unsigned char *buf, int buf_size, p+= strlen(p); } snprintf(p, end-p, "\n"); - } else + } else if(avctx->flags&CODEC_FLAG_PASS1) avctx->stats_out[0] = '\0'; f->picture_number++; |