Opened 4 months ago

Last modified 4 months ago

#10755 new defect

av_seek_frame on ogg with png stream abort()s

Reported by: doeme Owned by:
Priority: normal Component: avformat
Version: 6.0 Keywords: ogg
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by doeme)

I have a (potentially corrupt?) ogg file which contains an audio stream (vorbis) and a single static cover image (png). "avformat_find_stream_info" finds two streams, 0 => vorbis, 1 => png, however, if I try to seek in this file with "av_seek_frame" with stream_index = 1 (the png stream) libav abort()s due to stream_index >= nstreams in oggdec.c (https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/46775e64f8b34f5e4d09df8458654f9f50626c4b:/libavformat/oggdec.c#l937).

How to reproduce:

Build the attached sample program, and run it on the sample.

gcc `pkg-config --cflags --libs libavformat libavcodec libavutil` ogg-png-stream.c -o ogg-png-stream
./ogg-png-stream bug-ogg-pngstream-avseek-abort.ogg

Essentially, this only verifies that the stream with index 1 exists, and then tries to av_seek_frame() with all possible streams as time base, where the png stream 1 causes an abort()

Attachments (2)

ogg-png-stream.c (1.5 KB ) - added by doeme 4 months ago.
The test program
bug-ogg-pngstream-avseek-abort.ogg (500.0 KB ) - added by doeme 4 months ago.
The sample ogg file that causes the abort()

Download all attachments as: .zip

Change History (3)

by doeme, 4 months ago

Attachment: ogg-png-stream.c added

The test program

by doeme, 4 months ago

The sample ogg file that causes the abort()

comment:1 by doeme, 4 months ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.