[FFmpeg-devel] [ogg] Respect AVERROR codes returned by ogg header parsing.

Dale Curtis dalecurtis at chromium.org
Fri Dec 1 21:16:37 EET 2017

On Thu, Nov 30, 2017 at 5:49 PM, Michael Niedermayer <michael at niedermayer.cc
> wrote:

> I dont see anything really wrong with the file

For kicks, I tried running it through oggz-validate, but it doesn't know
how to handle ogm. Which TIL, is distinct from ogv.

> it seems what happens is that theres a data packet in one stream that
> preceeds the headers on the other streams, technically that data packet
> likely contains the video headers so its kind of a header too.
> The demuxer stops header parsing prematurly due to this.
> from there on it gets confused reading the same header twice
> while it determines the duration of the file which triggers the error
> There are a few differnt ways to fix this, iam not sure which is the
> simplest but i dont think the demuxer should fail in this case
Applying a workaround similar to what you did here works:

I.e. condition AVERROR_INVALIDATA based on priv->vp being incomplete here:

WDYT? Here's a patch to do this and fail on AVERROR w/o the AV_EF_EXPLODE

- dale
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_ogg_v5.patch
Type: text/x-patch
Size: 2517 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171201/d4aa803f/attachment.bin>

More information about the ffmpeg-devel mailing list