mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-25 04:30:02 +00:00
add support for Matroska subtitle tracks
Originally committed as revision 9591 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
45da8124a0
commit
f7e97aaf87
@ -262,6 +262,7 @@ enum CodecID {
|
|||||||
/* subtitle codecs */
|
/* subtitle codecs */
|
||||||
CODEC_ID_DVD_SUBTITLE= 0x17000,
|
CODEC_ID_DVD_SUBTITLE= 0x17000,
|
||||||
CODEC_ID_DVB_SUBTITLE,
|
CODEC_ID_DVB_SUBTITLE,
|
||||||
|
CODEC_ID_TEXT,
|
||||||
|
|
||||||
CODEC_ID_MPEG2TS= 0x20000, /* _FAKE_ codec to indicate a raw MPEG-2 TS
|
CODEC_ID_MPEG2TS= 0x20000, /* _FAKE_ codec to indicate a raw MPEG-2 TS
|
||||||
* stream (only used by libavformat) */
|
* stream (only used by libavformat) */
|
||||||
|
@ -58,6 +58,11 @@ CodecTags ff_mkv_codec_tags[]={
|
|||||||
{"A_REAL/ATRC" , CODEC_ID_ATRAC3},
|
{"A_REAL/ATRC" , CODEC_ID_ATRAC3},
|
||||||
{"A_REAL/COOK" , CODEC_ID_COOK},
|
{"A_REAL/COOK" , CODEC_ID_COOK},
|
||||||
// {"A_REAL/SIPR" , CODEC_ID_SIPRO},
|
// {"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}
|
{NULL , CODEC_ID_NONE}
|
||||||
/* TODO: AC3-9/10 (?), Real, Musepack, Quicktime */
|
/* TODO: AC3-9/10 (?), Real, Musepack, Quicktime */
|
||||||
};
|
};
|
||||||
|
@ -2028,10 +2028,8 @@ matroska_read_header (AVFormatContext *s,
|
|||||||
track = matroska->tracks[i];
|
track = matroska->tracks[i];
|
||||||
track->stream_index = -1;
|
track->stream_index = -1;
|
||||||
|
|
||||||
/* libavformat does not really support subtitles.
|
/* Apply some sanity checks. */
|
||||||
* Also apply some sanity checks. */
|
if (track->codec_id == NULL)
|
||||||
if ((track->type == MATROSKA_TRACK_TYPE_SUBTITLE) ||
|
|
||||||
(track->codec_id == NULL))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for(j=0; ff_mkv_codec_tags[j].str; j++){
|
for(j=0; ff_mkv_codec_tags[j].str; j++){
|
||||||
|
Loading…
Reference in New Issue
Block a user