Some samples in the wild are missing headers that are expected by the specification but in practice do not affect decoding.
Unified · Split
| @@ -478,8 +478,11 @@ static int ogg_get_headers(AVFormatContext *s) · 477 unmodified lines | ||
| 478 | 478 | if (os->codec && os->codec->nb_header && |
| 479 | 479 | os->nb_header < os->codec->nb_header) { |
| 480 | 480 | 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; | |
| 483 | 486 | } |
| 484 | 487 | if (os->start_granule != OGG_NOGRANULE_VALUE) |
| 485 | 488 | os->lastpts = s->streams[i]->start_time = |