[FFmpeg-cvslog] gxfenc: dont duplicate buffer size

Michael Niedermayer git at videolan.org
Sun Sep 9 14:48:46 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Sep  9 14:31:06 2012 +0200| [eb336cb881b476288a9ee32bd397bd0a23ac74c2] | committer: Michael Niedermayer

gxfenc: dont duplicate buffer size

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eb336cb881b476288a9ee32bd397bd0a23ac74c2
---

 libavformat/gxfenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c
index 8d89e9e..5d854c6 100644
--- a/libavformat/gxfenc.c
+++ b/libavformat/gxfenc.c
@@ -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,



More information about the ffmpeg-cvslog mailing list