diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-03-05 13:06:49 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-03-05 13:06:49 +0000 |
commit | 1326621c1afe17758a8a92294c3cf4f2b621df9e (patch) | |
tree | 6c8a993decb5315d2c1ec9e36b3348d1f817e88b | |
parent | 73e2261318fd80150ce6fa995efe0ef397f4c35a (diff) | |
download | ffmpeg-1326621c1afe17758a8a92294c3cf4f2b621df9e.tar.gz |
Subtitle support. (untested)
Originally committed as revision 12330 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/nut.c | 8 | ||||
-rw-r--r-- | libavformat/nut.h | 2 | ||||
-rw-r--r-- | libavformat/nutdec.c | 2 | ||||
-rw-r--r-- | libavformat/nutenc.c | 2 |
4 files changed, 12 insertions, 2 deletions
diff --git a/libavformat/nut.c b/libavformat/nut.c index fdcaac6a3e..4f6d319dc7 100644 --- a/libavformat/nut.c +++ b/libavformat/nut.c @@ -22,6 +22,14 @@ #include "nut.h" #include "tree.h" +const AVCodecTag ff_nut_subtitle_tags[] = { + { CODEC_ID_TEXT , MKTAG('U', 'T', 'F', '8') }, + { CODEC_ID_SSA , MKTAG('S', 'S', 'A', 0 ) }, + { CODEC_ID_DVD_SUBTITLE, MKTAG('D', 'V', 'D', 'S') }, + { CODEC_ID_DVB_SUBTITLE, MKTAG('D', 'V', 'B', 'S') }, + { CODEC_ID_NONE , 0 } +}; + void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){ int i; for(i=0; i<nut->avf->nb_streams; i++){ diff --git a/libavformat/nut.h b/libavformat/nut.h index 9439146035..4dee3a8da9 100644 --- a/libavformat/nut.h +++ b/libavformat/nut.h @@ -97,6 +97,8 @@ typedef struct { struct AVTreeNode *syncpoints; } NUTContext; +extern const AVCodecTag ff_nut_subtitle_tags[]; + void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val); int64_t ff_lsb2full(StreamContext *stream, int64_t lsb); int ff_nut_sp_pos_cmp(syncpoint_t *a, syncpoint_t *b); diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 402f1f5d4a..409cd7c588 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -322,7 +322,7 @@ static int decode_stream_header(NUTContext *nut){ break; case 2: st->codec->codec_type = CODEC_TYPE_SUBTITLE; -// st->codec->codec_id = codec_get_id(codec_wav_tags, tmp); FIXME + st->codec->codec_id = codec_get_id(ff_nut_subtitle_tags, tmp); break; case 3: st->codec->codec_type = CODEC_TYPE_DATA; diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index 7ed02573a2..de5ae6b2c3 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -771,5 +771,5 @@ AVOutputFormat nut_muxer = { write_packet, write_trailer, .flags = AVFMT_GLOBALHEADER, - .codec_tag= (const AVCodecTag*[]){codec_bmp_tags, codec_wav_tags, 0}, + .codec_tag= (const AVCodecTag*[]){codec_bmp_tags, codec_wav_tags, ff_nut_subtitle_tags, 0}, }; |