# HG changeset patch # User mru # Date 1113089268 0 # Node ID a827309802b5f597a3e866ae3ca5cec4dc9122b7 # Parent 17178af951b49ec6d1750855737e1378778e5308 pre-c99 compatibility diff -r 17178af951b4 -r a827309802b5 ogg2.c --- 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; diff -r 17178af951b4 -r a827309802b5 ogg2.h --- 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 {