summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-09-30 09:46:48 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-09-30 09:46:48 +0000
commitc9da676de43d778d62efb1cfa75544d770736d67 (patch)
tree9785a2860b13e738012f778fecfaa49f65132f5e
parent19635234b14e3ec80c1142a33642dcac003f41ba (diff)
downloadffmpeg-streaming-c9da676de43d778d62efb1cfa75544d770736d67.zip
ffmpeg-streaming-c9da676de43d778d62efb1cfa75544d770736d67.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 20093 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/oggdec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 5d42db7..adf0ad0 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);
OpenPOWER on IntegriCloud