# HG changeset patch # User reimar # Date 1198512309 0 # Node ID e88c0aa4bb963ae91cbe179311e5957cfd0e4181 # Parent fabaf34bd54508ebe3ab6426bb667497049d0c40 Use realloc_struct in more places for consistency diff -r fabaf34bd545 -r e88c0aa4bb96 libmpdemux/demux_ogg.c --- a/libmpdemux/demux_ogg.c Mon Dec 24 15:56:33 2007 +0000 +++ b/libmpdemux/demux_ogg.c Mon Dec 24 16:05:09 2007 +0000 @@ -807,7 +807,7 @@ } /// Init the data structure needed for a logical stream - ogg_d->subs = realloc(ogg_d->subs,(ogg_d->num_sub+1)*sizeof(ogg_stream_t)); + ogg_d->subs = realloc_struct(ogg_d->subs,ogg_d->num_sub+1,sizeof(ogg_stream_t)); memset(&ogg_d->subs[ogg_d->num_sub],0,sizeof(ogg_stream_t)); /// Get the stream serial number s_no = ogg_page_serialno(page); @@ -1046,9 +1046,9 @@ text_id = ogg_d->num_sub; new_sh_sub(demuxer, ogg_d->n_text); ogg_d->n_text++; - ogg_d->text_ids = realloc(ogg_d->text_ids, sizeof(int) * ogg_d->n_text); + ogg_d->text_ids = realloc_struct(ogg_d->text_ids, ogg_d->n_text, sizeof(int)); ogg_d->text_ids[ogg_d->n_text - 1] = ogg_d->num_sub; - ogg_d->text_langs = realloc(ogg_d->text_langs, sizeof(char *) * ogg_d->n_text); + ogg_d->text_langs = realloc_struct(ogg_d->text_langs, ogg_d->n_text, sizeof(char *)); ogg_d->text_langs[ogg_d->n_text - 1] = NULL; //// Unknown header type } else