Ticket #2317 (closed defect: fixed)

Opened 3 months ago

Last modified 7 weeks ago

Byte based seeks fail in chained OGG files (with FLAC codec)

Reported by: gjdfgh Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: ogg
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

See subject. Test samples can be produced with ffmpeg.

Change History

comment:1 Changed 3 months ago by cehoyos

Please provide a sample and add a failing command line including complete, uncut console output or explain how the problem can be reproduced if this is not possible with ffmpeg.

comment:2 Changed 3 months ago by gjdfgh

You can produce a sample by concatenating two OGG-in-flac files with "cat". I don't know how to force byte seeks with ffmpeg. With ffplay, the stream appears to be unseekable even with "-bytes 1". However, doing byte seeks when using libavformat as library are marked as supported, are reported as successful, and lead to strange behavior. Please test it yourself with ffplay (possibly by modifying the code to do byte seeks properly).

The behavior I'm experiencing is that libavformat does seem to seek to the correct position (I think it even demuxes some audio packets from the new position), but then it jumps back. I think it gets confused by the byte seek, and tries to "resync" to the "correct" (i.e. previous) file position by explicitly issuing a seek.

Sometimes, it also stops demuxing after printing some errors:

[ogg @ 0x8a8f120]Cannot identify new stream
[ogg @ 0x8a8f120]failed to create or replace stream
[ogg @ 0x8a8f120]Cannot identify new stream
[ogg @ 0x8a8f120]failed to create or replace stream

comment:3 Changed 7 weeks ago by michael

  • Status changed from new to closed
  • Resolution set to fixed
  • Reproduced by developer set

Fixed in e278500181b825bf6ccbe6e6aba1e993aa820dd2

comment:4 Changed 7 weeks ago by cehoyos

  • Keywords ogg added
  • Version changed from unspecified to git-master
  • Component changed from undetermined to avformat
Note: See TracTickets for help on using tickets.