diff options
author | Reinhard Tartler <siretart@tauware.de> | 2010-02-09 18:24:30 +0000 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2010-02-09 18:24:30 +0000 |
commit | 95f90d27d213fc3b9ca238a542728cd36a7583c7 (patch) | |
tree | bcc7d46f18b8c3e0950c6d7a2f108ef32f5889ae | |
parent | 1e9ac36f66560d94f252a176936c82763977a785 (diff) | |
download | ffmpeg-95f90d27d213fc3b9ca238a542728cd36a7583c7.tar.gz |
Disable parsing for ogg streams where no ogg header was found,
if no header was found the parser was not initialized and thus will
crash when trying to use it.
Originally committed as revision 21708 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
-rw-r--r-- | libavformat/oggdec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index 28dc56eeb9..54406f5479 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -477,12 +477,17 @@ static int ogg_read_header (AVFormatContext * s, AVFormatParameters * ap) { struct ogg *ogg = s->priv_data; + int i; ogg->curidx = -1; //linear headers seek from start if (ogg_get_headers (s) < 0){ return -1; } + for (i = 0; i < ogg->nstreams; i++) + if (ogg->streams[i].header < 0) + ogg->streams[i].codec = NULL; + //linear granulepos seek from end ogg_get_length (s); |