From ad3aa8745633e162cd1b79fbbaba44bc34af9b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Date: Sat, 9 Apr 2005 23:27:48 +0000 Subject: [PATCH] pre-c99 compatibility Originally committed as revision 4116 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/ogg2.c | 2 +- libavformat/ogg2.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/ogg2.c b/libavformat/ogg2.c index c54b2a04c5..065d3bc0a6 100644 --- a/libavformat/ogg2.c +++ b/libavformat/ogg2.c @@ -80,7 +80,7 @@ ogg_save (AVFormatContext * s) { ogg_t *ogg = s->priv_data; ogg_state_t *ost = - av_malloc(sizeof (*ost) + ogg->nstreams * sizeof (*ogg->streams)); + av_malloc(sizeof (*ost) + (ogg->nstreams-1) * sizeof (*ogg->streams)); int i; ost->pos = url_ftell (&s->pb);; ost->curidx = ogg->curidx; diff --git a/libavformat/ogg2.h b/libavformat/ogg2.h index b1146e314c..f397a57197 100644 --- a/libavformat/ogg2.h +++ b/libavformat/ogg2.h @@ -55,7 +55,7 @@ typedef struct ogg_state { uint64_t pos; int curidx; struct ogg_state *next; - ogg_stream_t streams[]; + ogg_stream_t streams[1]; } ogg_state_t; typedef struct ogg {