gxfenc: dont duplicate buffer size
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 9 Sep 2012 12:31:06 +0000 (14:31 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 9 Sep 2012 12:31:06 +0000 (14:31 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/gxfenc.c

index 8d89e9e..5d854c6 100644 (file)
@@ -205,7 +205,7 @@ static int gxf_write_mpeg_auxiliary(AVIOContext *pb, AVStream *st)
     else
         starting_line = 23; // default PAL
 
-    size = snprintf(buffer, 1024, "Ver 1\nBr %.6f\nIpg 1\nPpi %d\nBpiop %d\n"
+    size = snprintf(buffer, sizeof(buffer), "Ver 1\nBr %.6f\nIpg 1\nPpi %d\nBpiop %d\n"
                     "Pix 0\nCf %d\nCg %d\nSl %d\nnl16 %d\nVi 1\nf1 1\n",
                     (float)st->codec->bit_rate, sc->p_per_gop, sc->b_per_i_or_p,
                     st->codec->pix_fmt == PIX_FMT_YUV422P ? 2 : 1, sc->first_gop_closed == 1,