[MPlayer-dev-eng] [Possible bug]crash when decoding some rmvb files
Reimar =?UTF8?Q?D=F6ffinger?=
Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Jan 20 14:50:21 CET 2005
Hi,
> Recently I found MPlayer sometimes crashed when playing some rmvb files,
> and I
> did a little debug, the problem seems to be in these codes:
Try the attached patch.
Greetings,
Reimar Döffinger
-------------- next part --------------
? cvs-diff
? real_big_index_chunk_fix.diff
Index: libmpdemux/demux_real.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_real.c,v
retrieving revision 1.66
diff -u -r1.66 demux_real.c
--- libmpdemux/demux_real.c 15 Jan 2005 15:07:24 -0000 1.66
+++ libmpdemux/demux_real.c 20 Jan 2005 13:47:53 -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)
More information about the MPlayer-dev-eng
mailing list