Verified Commit 95d04953 authored by Matthew Walker's avatar Matthew Walker Committed by Ralph Giles

opusinfo: Add detection of extra packets in header pages.

Additional header packets are disallowed by the spec and
rejected by the opusfile decoder library. Report this
condition in opusinfo so it's more obvious what's wrong
with such files.

The output is a little confusing when the extra packet
is in the first page as it also tries to parse it as
a comment header.
Signed-off-by: Ralph Giles's avatarRalph Giles <>
parent 6c758c0e
Pipeline #1928 passed with stage
in 1 minute and 9 seconds
......@@ -109,6 +109,10 @@ void info_opus_process(stream_processor *stream, ogg_page *page )
if(header == 1 && packets >= 2) {
oi_warn(_("WARNING: Extra packet found in the page containing the Opus headers "
"in Opus stream %d\n"), stream->num);
if(inf->doneheaders < 2) {
if(inf->doneheaders==0 && opus_header_parse(packet.packet,packet.bytes,&inf->oh)!=1) {
oi_warn(_("WARNING: Could not decode Opus header "
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment