]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/oggparseogm.c
typo: occured --> occurred
[ffmpeg] / libavformat / oggparseogm.c
index bbf9cb8c8dbdcf1235960a485a8def4a339c4261..70e53948fb2ddc645c6b729b3287c61a6f881097 100644 (file)
@@ -36,7 +36,7 @@ ogm_header(AVFormatContext *s, int idx)
     ogg_t *ogg = s->priv_data;
     ogg_stream_t *os = ogg->streams + idx;
     AVStream *st = s->streams[idx];
-    uint8_t *p = os->buf + os->pstart;
+    const uint8_t *p = os->buf + os->pstart;
     uint64_t time_unit;
     uint64_t spu;
     uint32_t default_len;
@@ -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,