Commit 7fb2fe28 authored by reimar's avatar reimar

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.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20093 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 75480000
...@@ -477,12 +477,17 @@ static int ...@@ -477,12 +477,17 @@ static int
ogg_read_header (AVFormatContext * s, AVFormatParameters * ap) ogg_read_header (AVFormatContext * s, AVFormatParameters * ap)
{ {
struct ogg *ogg = s->priv_data; struct ogg *ogg = s->priv_data;
int i;
ogg->curidx = -1; ogg->curidx = -1;
//linear headers seek from start //linear headers seek from start
if (ogg_get_headers (s) < 0){ if (ogg_get_headers (s) < 0){
return -1; 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 //linear granulepos seek from end
ogg_get_length (s); ogg_get_length (s);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment