diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2008-01-31 22:30:55 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2008-01-31 22:30:55 +0000 |
commit | 2331e31c233b1b9ce6d626827342ffd70039c619 (patch) | |
tree | 5e3ced495736b19a7849f1ad43a508a1766598c1 /libavformat/oggparseogm.c | |
parent | b8fe8ab0620c50aa58da7e609484b85f666cc9a4 (diff) | |
download | ffmpeg-2331e31c233b1b9ce6d626827342ffd70039c619.tar.gz |
Add support for ogg text subtitles.
Originally committed as revision 11698 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/oggparseogm.c')
-rw-r--r-- | libavformat/oggparseogm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/oggparseogm.c b/libavformat/oggparseogm.c index bbf9cb8c8d..597a3c6ac0 100644 --- a/libavformat/oggparseogm.c +++ b/libavformat/oggparseogm.c @@ -55,6 +55,10 @@ ogm_header(AVFormatContext *s, int idx) tag = bytestream_get_le32(&p); st->codec->codec_id = codec_get_id(codec_bmp_tags, tag); st->codec->codec_tag = tag; + } else if (*p == 't') { + st->codec->codec_type = CODEC_TYPE_SUBTITLE; + st->codec->codec_id = CODEC_ID_TEXT; + p += 12; } else { uint8_t acid[5]; int cid; @@ -158,6 +162,13 @@ ogg_codec_t ogm_audio_codec = { .packet = ogm_packet }; +ogg_codec_t ogm_text_codec = { + .magic = "\001text", + .magicsize = 5, + .header = ogm_header, + .packet = ogm_packet +}; + ogg_codec_t ogm_old_codec = { .magic = "\001Direct Show Samples embedded in Ogg", .magicsize = 35, |