[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:
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=c04c43b3e423d0426162828e7b180e4d0014a3f7

I.e. condition AVERROR_INVALIDATA based on priv->vp being incomplete here:
http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/oggparsevorbis.c;h=65b1998a02d92d0fcaeb740d8f4523641502dbea;hb=HEAD#l319

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

- 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