Skip to content
Snippets Groups Projects
Commit f963f701 authored by Luca Barbato's avatar Luca Barbato
Browse files

ogg: relax demuxer conformance checks

Some samples in the wild are missing headers that are expected by the
specification but in practice do not affect decoding.
parent 42cc6cef
No related branches found
No related tags found
No related merge requests found
...@@ -478,8 +478,11 @@ static int ogg_get_headers(AVFormatContext *s) ...@@ -478,8 +478,11 @@ static int ogg_get_headers(AVFormatContext *s)
if (os->codec && os->codec->nb_header && if (os->codec && os->codec->nb_header &&
os->nb_header < os->codec->nb_header) { os->nb_header < os->codec->nb_header) {
av_log(s, AV_LOG_ERROR, av_log(s, AV_LOG_ERROR,
"Headers mismatch for stream %d\n", i); "Headers mismatch for stream %d: "
return AVERROR_INVALIDDATA; "expected %d received %d.\n",
i, os->codec->nb_header, os->nb_header);
if (s->error_recognition & AV_EF_EXPLODE)
return AVERROR_INVALIDDATA;
} }
if (os->start_granule != OGG_NOGRANULE_VALUE) if (os->start_granule != OGG_NOGRANULE_VALUE)
os->lastpts = s->streams[i]->start_time = os->lastpts = s->streams[i]->start_time =
......
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