Skip to content
Snippets Groups Projects
Commit 6e6abd02 authored by David Conrad's avatar David Conrad
Browse files

Fix Speex header parsing in ogg demuxer

Originally committed as revision 18101 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 1fa9726c
No related branches found
No related tags found
No related merge requests found
...@@ -36,9 +36,10 @@ static int speex_header(AVFormatContext *s, int idx) { ...@@ -36,9 +36,10 @@ static int speex_header(AVFormatContext *s, int idx) {
AVStream *st = s->streams[idx]; AVStream *st = s->streams[idx];
uint8_t *p = os->buf + os->pstart; uint8_t *p = os->buf + os->pstart;
if (os->psize < 80) if (os->seq > 1)
return 1; return 0;
if (os->seq == 0) {
st->codec->codec_type = CODEC_TYPE_AUDIO; st->codec->codec_type = CODEC_TYPE_AUDIO;
st->codec->codec_id = CODEC_ID_SPEEX; st->codec->codec_id = CODEC_ID_SPEEX;
...@@ -50,8 +51,10 @@ static int speex_header(AVFormatContext *s, int idx) { ...@@ -50,8 +51,10 @@ static int speex_header(AVFormatContext *s, int idx) {
st->time_base.num = 1; st->time_base.num = 1;
st->time_base.den = st->codec->sample_rate; st->time_base.den = st->codec->sample_rate;
} else
vorbis_comment(s, p, os->psize);
return 0; return 1;
} }
const struct ogg_codec ff_speex_codec = { const struct ogg_codec ff_speex_codec = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment