[Mplayer-cvslog] CVS: main/libmpdemux demux_mkv.c,1.1,1.2
Moritz Bunkus CVS
mosu at mplayerhq.hu
Mon Jan 19 20:51:09 CET 2004
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/scsi/2/tmp/cvs-serv14815
Modified Files:
demux_mkv.c
Log Message:
Fixed the subtitle line overflowing for SSA if there were too many \N in the subs.
Index: demux_mkv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mkv.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- demux_mkv.c 19 Jan 2004 19:16:10 -0000 1.1
+++ demux_mkv.c 19 Jan 2004 19:51:07 -0000 1.2
@@ -2265,6 +2265,12 @@
mkv_d->clear_subs_at[mkv_d->subs.lines++]
= timecode + block_duration;
*ptr2 = '\0';
+ if (mkv_d->subs.lines >= SUB_MAX_TEXT)
+ {
+ mp_msg (MSGT_DEMUX, MSGL_WARN, "[mkv] Warning: too many "
+ "sublines to render, skipping\n");
+ return;
+ }
ptr2 = mkv_d->subs.text[mkv_d->subs.lines];
ptr1 += 2;
}
@@ -2282,11 +2288,15 @@
{
if (state == 0) /* normal char --> newline */
{
- if (mkv_d->subs.lines == SUB_MAX_TEXT - 1)
- break;
*ptr2 = '\0';
mkv_d->clear_subs_at[mkv_d->subs.lines++]
= timecode + block_duration;
+ if (mkv_d->subs.lines >= SUB_MAX_TEXT)
+ {
+ mp_msg (MSGT_DEMUX, MSGL_WARN, "[mkv] Warning: too many "
+ "sublines to render, skipping\n");
+ return;
+ }
ptr2 = mkv_d->subs.text[mkv_d->subs.lines];
state = 1;
}
More information about the MPlayer-cvslog
mailing list