[FFmpeg-cvslog] lavf/oggdec: more explicit zeroing of the new ogg stream.

Clément Bœsch git at videolan.org
Sun Sep 16 18:34:20 CEST 2012


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Fri Sep 14 23:54:19 2012 +0200| [e18ea76523e74383269b02430c5174d500bd2601] | committer: Clément Bœsch

lavf/oggdec: more explicit zeroing of the new ogg stream.

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

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

diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 84d6d40..682a942 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -174,8 +174,8 @@ static int ogg_new_stream(AVFormatContext *s, uint32_t serial, int new_avstream)
         !(os = av_realloc(ogg->streams, size)))
         return AVERROR(ENOMEM);
     ogg->streams = os;
-    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);



More information about the ffmpeg-cvslog mailing list