aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ratecontrol.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-01-12 00:59:42 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-01-12 00:59:42 +0000
commit2fc8ea249f325c2017137847bc1a565b77f40f11 (patch)
tree34f0783859f7637871650292705b657650f30800 /libavcodec/ratecontrol.c
parent0ecca7a49f8e254c12a3a1de048d738bfbb614c6 (diff)
downloadffmpeg-2fc8ea249f325c2017137847bc1a565b77f40f11.tar.gz
dissallow sprintf
Originally committed as revision 3823 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r--libavcodec/ratecontrol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index a304f48f1a..71af4f4ec8 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -38,7 +38,7 @@ static int init_pass2(MpegEncContext *s);
static double get_qscale(MpegEncContext *s, RateControlEntry *rce, double rate_factor, int frame_num);
void ff_write_pass1_stats(MpegEncContext *s){
- sprintf(s->avctx->stats_out, "in:%d out:%d type:%d q:%d itex:%d ptex:%d mv:%d misc:%d fcode:%d bcode:%d mc-var:%d var:%d icount:%d;\n",
+ snprintf(s->avctx->stats_out, 256, "in:%d out:%d type:%d q:%d itex:%d ptex:%d mv:%d misc:%d fcode:%d bcode:%d mc-var:%d var:%d icount:%d;\n",
s->current_picture_ptr->display_picture_number, s->current_picture_ptr->coded_picture_number, s->pict_type,
s->current_picture.quality, s->i_tex_bits, s->p_tex_bits, s->mv_bits, s->misc_bits,
s->f_code, s->b_code, s->current_picture.mc_mb_var_sum, s->current_picture.mb_var_sum, s->i_count);