Mercurial > mplayer.hg
changeset 14897:cc02417dbf22
Fix rm files with a really big index chunk.
author | reimar |
---|---|
date | Thu, 03 Mar 2005 10:23:28 +0000 |
parents | 9ddae5897422 |
children | 57d00d7a9182 |
files | libmpdemux/demux_real.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_real.c Thu Mar 03 10:19:56 2005 +0000 +++ b/libmpdemux/demux_real.c Thu Mar 03 10:23:28 2005 +0000 @@ -245,6 +245,11 @@ priv->index_malloc_size[stream_id] = 2048; else priv->index_malloc_size[stream_id] += priv->index_malloc_size[stream_id] / 2; + // in case we have a really large chunk... + if (priv->index_table_size[stream_id] >= + priv->index_malloc_size[stream_id]) + priv->index_malloc_size[stream_id] = + priv->index_table_size[stream_id] + 1; priv->index_table[stream_id] = realloc(priv->index_table[stream_id], priv->index_malloc_size[stream_id]*sizeof(priv->index_table[0][0])); } if (priv->index_table_size[stream_id] > 0)