projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a317c6
)
Only allocate stats_out when needed in ffv1
author
Michael Niedermayer
<michaelni@gmx.at>
Tue, 26 Oct 2010 23:01:00 +0000
(23:01 +0000)
committer
Michael Niedermayer
<michaelni@gmx.at>
Tue, 26 Oct 2010 23:01:00 +0000
(23:01 +0000)
Originally committed as revision 25579 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/ffv1.c
patch
|
blob
|
history
diff --git
a/libavcodec/ffv1.c
b/libavcodec/ffv1.c
index
e9d6796
..
4e2dceb
100644
(file)
--- 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++;