changeset 727:a827309802b5 libavformat

pre-c99 compatibility
author mru
date Sat, 09 Apr 2005 23:27:48 +0000
parents 17178af951b4
children db6846a618bd
files ogg2.c ogg2.h
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ogg2.c	Sat Apr 09 15:32:58 2005 +0000
+++ b/ogg2.c	Sat Apr 09 23:27:48 2005 +0000
@@ -80,7 +80,7 @@
 {
     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;
--- a/ogg2.h	Sat Apr 09 15:32:58 2005 +0000
+++ b/ogg2.h	Sat Apr 09 23:27:48 2005 +0000
@@ -55,7 +55,7 @@
     uint64_t pos;
     int curidx;
     struct ogg_state *next;
-    ogg_stream_t streams[];
+    ogg_stream_t streams[1];
 } ogg_state_t;
 
 typedef struct ogg {