[MPlayer-cvslog] r38337 - trunk/sub/subreader.c

reimar subversion at mplayerhq.hu
Wed Feb 23 22:43:52 EET 2022


Author: reimar
Date: Wed Feb 23 22:43:52 2022
New Revision: 38337

Log:
subreader.c: very basic dtc subtitle support.

Just treat it like microdvd format.
It is similar enough to result in usable subtitles,
though it likely is not entirely correct.

Fixes trac issue #2379.

Modified:
   trunk/sub/subreader.c

Modified: trunk/sub/subreader.c
==============================================================================
--- trunk/sub/subreader.c	Wed Feb 23 21:36:45 2022	(r38336)
+++ trunk/sub/subreader.c	Wed Feb 23 22:43:52 2022	(r38337)
@@ -1159,6 +1159,10 @@ static int sub_autodetect (stream_t* st,
 	if (!stream_read_line (st, line, LINE_LEN, utf16))
 	    return SUB_INVALID;
 
+	// drtic/dtc format starts with [JRT2: line. It is not identical
+	// to microdvd, but very close and we have no spec
+	if (strncmp(line, "[JRT2:", 6) == 0)
+		{*uses_time=0;return SUB_MICRODVD;}
 	if (sscanf (line, "{%d}{%d}", &i, &i)==2)
 		{*uses_time=0;return SUB_MICRODVD;}
 	if (sscanf (line, "{%d}{}", &i)==1)


More information about the MPlayer-cvslog mailing list