[FFmpeg-devel] Order of demuxed packets after a seek in an ogg container.

wm4 nfxjfg at googlemail.com
Fri Jun 27 19:07:32 CEST 2014

On Wed, 25 Jun 2014 15:37:11 -0700
Dale Curtis <dalecurtis at chromium.org> wrote:

> Hi,
> If av_seek_frame() is used to seek within a specific stream, are future
> av_read_frame() calls guaranteed to return all packets from all other
> streams in the container with timestamps after the seek timestamp?

I don't understand why this wouldn't be guaranteed. It sounds like a
quality of implementation issue with the ogg demuxer to me. Just
because it chose a simple way to implement this (apparently returning
all packets after the destination file position, according to the other
comments), it doesn't mean it's correct.

Just intuitively I'd say it should determine the target file position
for all active streams, then start demuxing from the lowest file
position of these streams, and skip any packets that are before the
seek target PTS.

No weird avformat_seek_file() API required, and no selecting of a
target stream either.

Am I wrong, am I missing something?

More information about the ffmpeg-devel mailing list