**/
#include <stdlib.h>
+#include "libavutil/intreadwrite.h"
+#include "libavcodec/bitstream.h"
+#include "libavcodec/bytestream.h"
#include "avformat.h"
-#include "bitstream.h"
-#include "bytestream.h"
-#include "intreadwrite.h"
-#include "ogg2.h"
+#include "oggdec.h"
#include "riff.h"
static int
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;
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;
acid[4] = 0;
cid = strtol(acid, NULL, 16);
st->codec->codec_id = codec_get_id(codec_wav_tags, cid);
+ st->need_parsing = AVSTREAM_PARSE_FULL;
}
p += 4; /* useless size field */
uint8_t *p = os->buf + os->pstart;
int lb;
+ if(*p & 8)
+ os->pflags |= PKT_FLAG_KEY;
+
lb = ((*p & 2) << 1) | ((*p >> 6) & 3);
os->pstart += lb + 1;
os->psize -= lb + 1;
.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,