[MPlayer-cvslog] r32033 - trunk/subreader.c
aurel
subversion at mplayerhq.hu
Sun Aug 29 13:27:00 CEST 2010
Author: aurel
Date: Sun Aug 29 13:27:00 2010
New Revision: 32033
Log:
fix crash with un-commonly formated ASS files
Modified:
trunk/subreader.c
Modified: trunk/subreader.c
==============================================================================
--- trunk/subreader.c Sun Aug 29 08:51:05 2010 (r32032)
+++ trunk/subreader.c Sun Aug 29 13:27:00 2010 (r32033)
@@ -641,19 +641,20 @@ static subtitle *sub_read_line_ssa(strea
do {
if (!stream_read_line (st, line, LINE_LEN, utf16)) return NULL;
- } while (sscanf (line, "Dialogue: Marked=%d,%d:%d:%d.%d,%d:%d:%d.%d,"
+ } while (sscanf (line, "Dialogue: Marked=%d,%d:%d:%d.%d,%d:%d:%d.%d"
"%[^\n\r]", ¬hing,
&hour1, &min1, &sec1, &hunsec1,
&hour2, &min2, &sec2, &hunsec2,
line3) < 9
&&
- sscanf (line, "Dialogue: %d,%d:%d:%d.%d,%d:%d:%d.%d,"
+ sscanf (line, "Dialogue: %d,%d:%d:%d.%d,%d:%d:%d.%d"
"%[^\n\r]", ¬hing,
&hour1, &min1, &sec1, &hunsec1,
&hour2, &min2, &sec2, &hunsec2,
line3) < 9 );
line2=strchr(line3, ',');
+ if (!line2) return NULL;
for (comma = 4; comma < max_comma; comma ++)
{
More information about the MPlayer-cvslog
mailing list