#define DECODER_BUFFER_SIZE MAX_PAGE_SIZE
static ogg_codec_t *ogg_codecs[] = {
+ &speex_codec,
&vorbis_codec,
&theora_codec,
&flac_codec,
&old_flac_codec,
&ogm_video_codec,
&ogm_audio_codec,
+ &ogm_text_codec,
&ogm_old_codec,
NULL
};
ogg_state_t *ost =
av_malloc(sizeof (*ost) + (ogg->nstreams-1) * sizeof (*ogg->streams));
int i;
- ost->pos = url_ftell (&s->pb);;
+ ost->pos = url_ftell (s->pb);
ost->curidx = ogg->curidx;
ost->next = ogg->state;
ost->nstreams = ogg->nstreams;
ogg_restore (AVFormatContext * s, int discard)
{
ogg_t *ogg = s->priv_data;
- ByteIOContext *bc = &s->pb;
+ ByteIOContext *bc = s->pb;
ogg_state_t *ost = ogg->state;
int i;
static int
ogg_read_page (AVFormatContext * s, int *str)
{
- ByteIOContext *bc = &s->pb;
+ ByteIOContext *bc = s->pb;
ogg_t *ogg = s->priv_data;
ogg_stream_t *os;
int i = 0;
int idx = -1, i;
offset_t size, end;
- if(s->pb.is_streamed)
+ if(url_is_streamed(s->pb))
return 0;
// already set
if (s->duration != AV_NOPTS_VALUE)
return 0;
- size = url_fsize(&s->pb);
+ size = url_fsize(s->pb);
if(size < 0)
return 0;
end = size > MAX_PAGE_SIZE? size - MAX_PAGE_SIZE: size;
ogg_save (s);
- url_fseek (&s->pb, end, SEEK_SET);
+ url_fseek (s->pb, end, SEEK_SET);
while (!ogg_read_page (s, &i)){
if (ogg->streams[i].granule != -1 && ogg->streams[i].granule != 0 &&
int64_t pos_limit)
{
ogg_t *ogg = s->priv_data;
- ByteIOContext *bc = &s->pb;
+ ByteIOContext *bc = s->pb;
int64_t pts = AV_NOPTS_VALUE;
int i;
url_fseek(bc, *pos_arg, SEEK_SET);