[FFmpeg-devel] [PATCH] matroska: Identify S_TEXT/UTF-8 tracks as SRT and not TEXT.

Philip Langdale philipl at overt.org
Sun May 20 23:50:45 CEST 2012


Currently, the table says these tracks are TEXT and SRT, but due
to the way the lookup works, the first entry in the table is the only
one that gets used. In practice, identifying these tracks as TEXT
is wrong for a couple of reasons:

1) In all cases I've ever seen, the subtitle is intended to be in
SRT format.

2) TEXT is not a well defined concept, as there is no way to handle
the timing information stored in the container metadata. Absent that
information, there is no difference between SRT and plaintext, and
only SRT defines a way to store that information within an extracted
stream.

Signed-off-by: Philip Langdale <philipl at overt.org>
---
 libavformat/matroska.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/libavformat/matroska.c b/libavformat/matroska.c
index 52481d7..98c0dc8 100644
--- a/libavformat/matroska.c
+++ b/libavformat/matroska.c
@@ -51,7 +51,6 @@ const CodecTags ff_mkv_codec_tags[]={
     {"A_VORBIS"         , CODEC_ID_VORBIS},
     {"A_WAVPACK4"       , CODEC_ID_WAVPACK},
 
-    {"S_TEXT/UTF8"      , CODEC_ID_TEXT},
     {"S_TEXT/UTF8"      , CODEC_ID_SRT},
     {"S_TEXT/ASCII"     , CODEC_ID_TEXT},
     {"S_TEXT/ASS"       , CODEC_ID_SSA},
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list