[FFmpeg-devel] [PATCH 6/9] lavf/oggdec: more explicit zeroing of the new ogg stream.

Clément Bœsch ubitux at gmail.com
Sat Sep 15 01:20:45 CEST 2012


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

diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 451e392..2c7bbd8 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -173,8 +173,8 @@ static int ogg_new_stream(AVFormatContext *s, uint32_t serial, int new_avstream)
                                 sizeof(*ogg->streams));
     if (!ogg->streams)
         return AVERROR(ENOMEM);
-    memset (ogg->streams + idx, 0, sizeof (*ogg->streams));
     os = ogg->streams + idx;
+    memset(os, 0, sizeof(*os));
     os->serial = serial;
     os->bufsize = DECODER_BUFFER_SIZE;
     os->buf = av_malloc(os->bufsize + FF_INPUT_BUFFER_PADDING_SIZE);
-- 
1.7.12



More information about the ffmpeg-devel mailing list