History

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.

Luca Barbato committed 13 years ago

Commit f963f701 parent 42cc6ce1 file · +5 −2Browse files

Unified · Split

libavformat/oggdec.c+5−2
@@ -478,8 +478,11 @@ static int ogg_get_headers(AVFormatContext *s) · 477 unmodified lines
478478 if (os->codec && os->codec->nb_header &&
479479 os->nb_header < os->codec->nb_header) {
480480 av_log(s, AV_LOG_ERROR,
481− "Headers mismatch for stream %d\n", i);
482− return AVERROR_INVALIDDATA;
481+ "Headers mismatch for stream %d: "
482+ "expected %d received %d.\n",
483+ i, os->codec->nb_header, os->nb_header);
484+ if (s->error_recognition & AV_EF_EXPLODE)
485+ return AVERROR_INVALIDDATA;
483486 }
484487 if (os->start_granule != OGG_NOGRANULE_VALUE)
485488 os->lastpts = s->streams[i]->start_time =

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t