changeset 2244:93ffcd9d826f libavformat

add support for Matroska subtitle tracks
author aurel
date Wed, 11 Jul 2007 13:13:20 +0000
parents 639597604897
children 223a74395827
files matroska.c matroskadec.c
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/matroska.c	Wed Jul 11 12:45:14 2007 +0000
+++ b/matroska.c	Wed Jul 11 13:13:20 2007 +0000
@@ -58,6 +58,11 @@
     {"A_REAL/ATRC"      , CODEC_ID_ATRAC3},
     {"A_REAL/COOK"      , CODEC_ID_COOK},
 //    {"A_REAL/SIPR"      , CODEC_ID_SIPRO},
+
+    {"S_TEXT/ASCII"     , CODEC_ID_TEXT},
+    {"S_TEXT/UTF8"      , CODEC_ID_TEXT},
+    {"S_VOBSUB"         , CODEC_ID_DVD_SUBTITLE},
+
     {NULL               , CODEC_ID_NONE}
 /* TODO: AC3-9/10 (?), Real, Musepack, Quicktime */
 };
--- a/matroskadec.c	Wed Jul 11 12:45:14 2007 +0000
+++ b/matroskadec.c	Wed Jul 11 13:13:20 2007 +0000
@@ -2028,10 +2028,8 @@
             track = matroska->tracks[i];
             track->stream_index = -1;
 
-            /* libavformat does not really support subtitles.
-             * Also apply some sanity checks. */
-            if ((track->type == MATROSKA_TRACK_TYPE_SUBTITLE) ||
-                (track->codec_id == NULL))
+            /* Apply some sanity checks. */
+            if (track->codec_id == NULL)
                 continue;
 
             for(j=0; ff_mkv_codec_tags[j].str; j++){